Theme switch results in incorrect data which prevents access to dashboard editor and new page templa
-
This problem first manifested when another group was unable to access wp-admin/themes.php. The symptoms are:
* theme-editor.php is inaccessible
* Theme metadata is missing (author info, description, thumbnail, etc)
* We had only three themes installed (classic, bp default, and a child theme of bp). It was broken in such a way that none of the installed themes were listed as active(!), but the site was displaying the child theme.After doing some Internet searches, the most common advice was to switch to another theme, and then switch back. Unhappily, I did that. (I’m not a big fan of black box fixes.)
Some things were fixed:
* theme-editor.php became accessible again.
* The theme manager (themes.php) began displaying the metadata correctly for the child theme (author, description, thumbnail, etc.)Different things were broken:
* Theme settings were not preserved, which resulted in a messed up home page
** 4 widgets were missing from the left sidebar
** Alignment was broken, everything was shifted left, due to the missing widgets.
* Messed up single post page
** Again, all left navbar widgets were missingI had saved the contents of wp_options, so I diffed the contents before and after theme switch. In wp_options, there were two entries of interest:
template
Before switch: bp-default
After switch: foobartemplate_root
Before switch: /plugins/buddypress/bp-themes
After switch: /themesIntrigued, I restored the wp_options to its pre-theme-switch state. (I.e. working site, broken theme editor). I then manually edited template_root from /plugins/buddypress/bp-themes to /themes. This broke the left sidebar (missing widgets) again. I reverted my change, which restored the missing widgets.
Then I edited template from bp-default to foobar. Again, the left sidebar broke. Reverting my change put it right.
So to get a fully-functioning site, the trick is to:
1) Change the theme from foobar to something else back to foobar
2) Change wp_options.template from foobar to bp-default
3) Change wp_options.template_root from /themes to /plugins/buddypress/bp-themesI’d like to fix this so I don’t have to go edit database tables by hand, but I’m not really sure where the underlying problem is. Any guidance would be appreciated.
- The topic ‘Theme switch results in incorrect data which prevents access to dashboard editor and new page templa’ is closed to new replies.