"Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17

Started by Svippy, February 23, 2020, 07:23:06 AM

Previous topic - Next topic

Svippy

The upgrade itself went fine.  But now that I try to access the site, not even logged in yet, I get "unable to load 'main_above' template" on every page.

I have ensured that all the Themes use "template_html_above" rather than "template_main_above", but I still cannot figure out where the message "main_above" is coming from.  It doesn't appear in any of the PHP files nor anywhere in the database, except the error logs.

I have copied over the default and core Themes from a fresh install of SMF to see if that was the problem.  But the error still occurs.  We use a custom theme, which may be the culprit, but I don't know how to change the default settings to use the default and/or core theme for users that are not logged in.  I've also changed the domain and the cookie ID to ensure I am not logged in.

I have full shell and database access.  It's a Debian Jessie installation, if that makes any difference, running PHP 7.

Antechinus

If the custom theme is coded for 1.1.x, and the forum is set to use the custom theme, that will be the problem.

If your admin settings allow users to choose their own themes, you can get into the forum by appending ;theme=1 to the end of the forum url. This will set you to the 2.0.x default theme for that session.

If admin settings stop you choosing a theme as a guest, then you'll need to go into the database and reset it there.

Svippy

I'm assuming you mean "?theme=1" at the end of the URL, but that returns the same error, probably meaning that guests cannot choose themes.  Where in the database is this setting located?  The old smf_settings and smf_themes tables are gone.

Antechinus

Yep, ?theme=1 for the home page. My mistake. If you're tacking it on the end of another url (like https://www.simplemachines.org/community/index.php?action=search) that's when you use the semicolon.

Anyway, you should definitely still have a settings table and a themes table. If you haven't, that means your database is incomplete.

The settings are theme_allow (to allow users to choose a theme) and theme_default (to set the forum default theme). Both should be in the settings table. Set them both to 1 for this exercise, until you get things sorted out.

ETA: You can also see theme_guests to 1. Shouldn't be essential, but can't hurt.

Svippy

Ah yes, I found the tables.  Apparently phpMyAdmin was hiding them in its quick access view, when it hadn't during the previous version.  Anyway, I changed the settings you mentioned, and it is now working.  Thank you.  I will see what I need to do to get our old custom theme working with 2.0.17.

Advertisement: