Theme missing?
Created 5 years ago by jzachary

I have an odd issue, my entire pyro install will crash if i remove "STANDARD_THEME=pyrocms.theme.starter" from the .env file. leaving it in there will let me access the admin section. But the live site is not viewable, i get the Laravel default page instead of the theme. Not sure what's causing it, I re-downloaded the starter theme and installed it but i'm still stuck with the issue.

any ideas?

finnito  —  5 years ago

Hey @jzachary!

What did you do leading up to this happening? Did you try install a different theme? Is that theme still in your addons folder?

If you have access to your database you can look in your table that is {appSlug}_settings_settings to check what your standard theme is defined to be. It is possible that it is set to be a theme that does not exist in your addons folder and therefore throws an error if you remove the .env variable that is overriding that setting.

You can run a query that looks like this on your database (switching out your database and app slug names) to see what the theme is set to:

SELECT * FROM pyrocms.nzen_settings_settings WHERE `key`='streams::standard_theme';

And if you want to change the theme to anomaly.theme.starter, run this query:

UPDATE pyrocms.nzen_settings_settings SET `value`='anomaly.theme.starter` WHERE `key`='streams::standard_theme';

Alternatively, if you can log into your admin panel and navigate to /admin/settings you should be able to find an option to change your public theme. This option will be greyed out while you have your .env variable set because it overrides it. But, if you can get into your admin panel and then remove the .env variable you should be able to change the setting.

Good luck!

jzachary  —  5 years ago

I had installed some themes manually and by the artisan command, just experimenting and making sure I understand how it all works. I had removed them, and re-installed the starter theme. I checked in the database like you said and it was set for the starter theme. If i remove the .env variable for the them I loose admin panel access, and I get this error: "Call to a member function getNamespace() on null" in /vendor/anomaly/streams-platform/src/View/Twig/Loader.php

I was also creating a module and some streams. They may be part of it as well lol.

finnito  —  5 years ago

Hrm that's interesting. Have you tried composer dump-autoload?

It's also possible that you need to clean up your streams with artisan. Possibly try php artisan streams:refresh or php artisan streams:cleanup.

jzachary  —  5 years ago

Yes, I've done the composer dump, I ran streams:destroy, then the refresh and cleanup. I got rid of one of the major errors. Now I can remove the theme from the .env file and not crash the site. But the public home page is still showing Laravel default install.

Getting close... 😄

ryanthompson  —  5 years ago

Now you need to check out your pages and toggle on a home page (default route). Otherwise ya the Laravel one will show by default.

jzachary  —  5 years ago

ah ok. I was able to install the theme with composer, and I set the home page with it, now it's working. I think I sorted it all out. Seems to be working.