Custom Theme Broken - No Dashboard Theme Access ERROR

Hardcore 5.6 user.

I have created sites in 5.7 with custom themes, but I’m starting to dabble with v9. Completely overwhelmed by how complicated it is to create a custom theme, along with the lack of documentation.

I pulled an old theme from a 5.7 site, added it to my /application/themes folder, installed and began modifying … probably not using the full potential of themes, but it worked.

The theme didn’t have a page_theme.php file and I wanted to add Bootstrap grid layouts so i added the file and attempted to add the correct lines. Uninstalled and then reinstalled my theme to activate … and now I have an error when trying to install, uninstall or switch themes.

I’m getting Target class [\Concrete\Theme\MyThemeName\PageTheme] does not exist. I think I undestand its because my theme doesn’t exist in the concrete folder (which it doesn’t) but not sure how to revert back to before I added the page_theme.php file.

Tried renaming that file, but some of that info must have been registered somewhere.

5.6 used to be so easy…

\Concrete\Theme\MyThemeName\PageTheme
Is trying to access the wrong namespace…
It should be \Application\Theme\MyThemeName\PageTheme

Thanks for the reply!

I understand that it’s looking in the wrong place but I guess my question is …

Since I added the page_theme file (probably improperly) and now uninstalled/reinstalled my theme, does that information get stored somewhere that I can clear it and return to the state I had before I added the page_theme file?

I renamed the page_theme file, cleared the system cache and cleared my browser cache but am still getting the error.

Is there some sort of database entry that gets generated from that file that I need to clear somehow?

Thanks in advance!

You could try refreshing the database entities.
Go to dashboard/system/environment/entities, set your development mode to ‘On’ and then Refresh Entities

Ugh. No dice.

Strange that if I’m trying to develop a custom theme for a site and I incorrectly code the page_theme file that I’m permanently locked out of making any theme changes through that interface. Seems too easy to mess up.

You may want to add your +1 to this issue

1 Like

Absolutely.

It’s just absurd that I tried to add some functionality to a simple basic theme and now I have no access to the theme section of the dashboard. Waaay more complicated than the OG version.

Thankfully I just started developing, but now I’m considering just hand coding the site to avoid any future mishaps.

I can take a look for you.

Email me:

hello@tm-designs.co.uk

Sidenote: If you want something simple, it’s better to duplicate the included “Elemental” theme, rather than “Atomik”. Elemental is simpler and more familiar for 5.6/5.7 developers.