Welcome to Geeklog, Anonymous Sunday, July 20 2025 @ 12:25 am EDT

Geeklog Forums

PHP error on migration


I can't find this error on other posts, unsure what the cause is or how to fix. Moved from 2.2.1sr1 to 2.2.2 after moving servers to AWS:

E_WARNING(2) - Undefined variable $image_form @ /sites/directoryname/geeklog/public_html/admin/article.php line 833

Call Stack
# Function File Line
1 storyeditor /sites/directoryname/geeklog/public_html/admin/article.php 1009
 Quote

Status: offline
Site Admin
Admin
Registered: 09/27/05
Posts: 1475
So it worked fine on AWS with 2.2.1sr1? (just not with Geeklog v2.2.2)
 Quote

It was working fine on our prior host, backed up the entire database and moved to AWS. Installed a new copy of 2.2.2, ran the install script, it noticed it was an upgrade and proceeded to do that and said successful. The editor causes this error. Everything else seems to work OK. Tried all the themes available, but same error.
 Quote

Status: offline
Site Admin
Admin
Registered: 09/27/05
Posts: 1475
I haven't tested this yet but adding the line:

Text Formatted Code
$image_form = '';
on line # 738 (I believe that is the exact line number)

just before the code line

Text Formatted Code
if ($_CONF['maximagesperarticle'] > 0) {
(so this line was line # 738, it will now be 739)

should fix the problem I believe.

The section of code would then look like:

Text Formatted Code

    $allowed_html .= COM_allowedAutotags(false, $allowed_tags);
    $story_templates->set_var('lang_allowed_html', $allowed_html);
    $image_form = '';
    if ($_CONF['maximagesperarticle'] > 0) {
        $story_templates->set_block('editor', 'image-form');
        $story_templates->set_block('editor', 'image-form-elements');
 
 Quote

Thanks so much, that worked!
 Quote

All times are EDT. The time is now 12:25 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content