Advertisement:

Author Topic: "Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17  (Read 218 times)

Offline Svippy

  • Newbie
  • *
  • Posts: 3
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.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,109
  • Master of BBC Abuse
Re: "Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17
« Reply #1 on: February 23, 2020, 07:31:07 AM »
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.

Offline Svippy

  • Newbie
  • *
  • Posts: 3
Re: "Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17
« Reply #2 on: February 23, 2020, 07:34:50 AM »
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.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,109
  • Master of BBC Abuse
Re: "Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17
« Reply #3 on: February 23, 2020, 08:13:30 AM »
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.

Offline Svippy

  • Newbie
  • *
  • Posts: 3
Re: "Unable to load 'main_above' template" after upgrade from 1.1.x to 2.0.17
« Reply #4 on: February 23, 2020, 09:17:58 AM »
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.