News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

eval Error in load.php After Upgrade

Started by von Corax, May 18, 2022, 06:28:55 PM

Previous topic - Next topic

von Corax

I'm working on a rehearsal for a forum upgrade and move. I'm getting some of the problems sorted, but I've run into one I can't figure out.

Specifically, where the message "Remember you're in maintenance mode" message should be I see the message "Notice: Undefined offset: 616 in /home/www/forum/Sources/Load.php(2272) : eval()'d code on line 259". This same message appears in numerous other places on my page, with different offsets and line numbers. Inspection of load.php reveals that this particular eval is conditioned by the value of $modSettings['disableTemplateEval'], which seems simple enough, but I can't see where to change this setting. Can anyone help me solve this?

Doug Heffernan

Quote from: von Corax on May 18, 2022, 06:28:55 PMI'm working on a rehearsal for a forum upgrade and move. I'm getting some of the problems sorted, but I've run into one I can't figure out.

Specifically, where the message "Remember you're in maintenance mode" message should be I see the message "Notice: Undefined offset: 616 in /home/www/forum/Sources/Load.php(2272) : eval()'d code on line 259". This same message appears in numerous other places on my page, with different offsets and line numbers. Inspection of load.php reveals that this particular eval is conditioned by the value of $modSettings['disableTemplateEval'], which seems simple enough, but I can't see where to change this setting. Can anyone help me solve this?

Are you getting this error after you ran the upgrader? What is your php version? What language are you using as a default for your forum?

Arantor

Almost certainly this is a 1.1 theme (or a 2.x knockoff not properly ported to newer versions) with an old language reference to $txt[616] which is the old $txt reference for maintenance mode.

You can't use a 1.1 theme on 2.0 (or a 2.0 theme on 2.1) without fixing up all the things like this.

von Corax

Quote from: Arantor on May 19, 2022, 07:40:41 AMAlmost certainly this is a 1.1 theme (or a 2.x knockoff not properly ported to newer versions) with an old language reference to $txt[616] which is the old $txt reference for maintenance mode.

You can't use a 1.1 theme on 2.0 (or a 2.0 theme on 2.1) without fixing up all the things like this.
It is a 1.1 theme. I'm migrating from 1.1 to 2.0; I eventually plan to migrate again from 2.0 to 2.1.  Are there any tools to help migrate a theme?

Arantor

Unfortunately not. The changes between 1.1 and 2.0, and again 2.0 to 2.1 mean it's usually easier to just remake the theme using a copy of the new default theme to suit rather than try to 'migrate it', and simply switch to the default theme during the upgrade.

Advertisement: