PageTheme Broken The Website
I'm creating a Theme from the ground, I added the page pages templates, pages types, created the corresponding php files and then I tried create a page_theme.php but after install the Theme I can revert back to another theme because every time I go the settings Pages & Themes I got the following error:
When I copy the Elemental Theme
Cannot redeclare class Concrete\Theme\Elemental\PageTheme
When I create a new one
Class ...PageTheme does not exist
I lost all the access to the content that I did before and even after new installation I installed new Theme and got the same problem. There is no way of reverting? I feel a little afraid of using Concrete5, looks very open to create new models but if a simple install of a theme can broken all the website I fell little worry.
Thank you very much for all the help.
I found some important information inside this forum and I corrected the namespace inside page_theme.php and the Theme got back, not the old one, because I really lost the content but the second try.
Maybe this is almost like a request and I apology if I am putting in the wrong place but anyone see any solution to prevent this kind of error? Because I see that it's very hard to revert or at least go back to other working team.
Concrete5 5.7 is very new and has limited documentation. There is a page with good information on making basic themes though.
"I found some important information inside this forum and I corrected the namespace inside page_theme.php and the Theme got back, not the old one, because I really lost the content but the second try."
When you created the new theme. Did you use the same area names in the template files? Did you use custom layouts in the new theme?
If you use a different area naming system between themes, concrete5 will not know where to put the content.
deleting these files should fix your problem. before creating your own theme based on elemental log onto your site and turn off all cache settings first. This will prevent you getting stuck in this situation