Theming, Caching and how to do it?

Having a strange problem with theming here.

  • I use a custom theme
  • Theming app is disabled
  • Nextcloud 12.0.4

On a local dev server, I see the custom theme.
On an online staging server, I see the default theme.
On an exactly identically configured live server, I see the custom theme.

I don’t know of any cache I could clear.

I followed this advice from the manual (Theming Nextcloud — Nextcloud Developer Manual 12 documentation)

put a new theme into the /themes folder. The theme can be activated by putting ‘theme’ => ‘MyTheme’ into the /config/config.php file.
make your changes in the /themes/MyTheme folder
make sure that the theming app is disabled

Are there reliable set-up steps for custom themes I could check once again to find the error?

I would start by double checking these things on the staging server:

1 Like

Thanks for the hints!

Yes, no typos. Permissions correctly configured. I’m sorry, but I’m pulling my hair out… Also, when updating defaults.php in the theme on the production-server – no update in the frontend.

I’m not sure if restarting Apache (or Nginx, whatever you’re using) would help, but you could try that or reboot the server.
Are you seeing any errors in the Nextcloud logs?

1 Like

I found the problem and you’re right, it would be solved by restarting the webserver. It was an incorrectly configured OpCache that couldn’t be cleared by Nextcloud. I have now implemented OpCache clearing and it works on both, staging and live now. :slight_smile:

Also: Thanks for your rapid responses. :slight_smile:

Glad to hear you got it working :slight_smile: