Server: Preview of theming does not work anymore

Created on 4 Aug 2017  路  5Comments  路  Source: nextcloud/server

  • change a value in the theming app
  • wait for it to be saved
  • then the "Loading preview" will show up
  • actual: it loads endlessly and if you look at the network it will show you a 404 on css/core/server.css
  • expected: the server.css is properly loaded and the loading spinner goes away

Problem: The server.css is in my instance for example served under css/core/72408cbdff8901cd16b886aeabcc367c-server.css - I guess the reloadStylesheets() method needs an adjustment to fetch the current name of this an reload that css.

https://github.com/nextcloud/server/blob/3470d0a44ea2b7a477af407b3d9abee81de071e3/apps/theming/js/settings-admin.js#L44-L65

cc @danxuliu @juliushaertl @nextcloud/theming

Valid for at least master.

bug theming regression

Most helpful comment

I was already working on fixing this ;-)

All 5 comments

I was already working on fixing this ;-)

Also broken on 12.0.1 RC4 :see_no_evil:

Fix is in #5981

I think I have the same issue and it is cause by caching.

When I disable caching it works fine.
Is there a way to force reloading the new files into the cache whenever there is a theme change?

Seems I'm hit by this in NC17, too. Standard setup of nginx/mariadb/apcu/redis on Arch.

I get 404 for https://test.seyfarth.de/apps/theming/styles?reload=1570557643276.
FX_DevConsoleNetwork says "cache-control: no-cache, no-store, must-revalidate".

@fduraibi What do you mean by disabling cache? Redis? Not an option except for debugging :-)

Edit: Just noticed that it works fine in Chrome, and that I have plenty of CSP blocked URIs in Firefox. If anyone has a hint on where to debug THAT (but that's off-topic, sorry).

During my tests I also encountered that the page is missing css altogehter, I then see these error messages:

Refused to apply style from 'https://cloud.domain.com/css/core/68b4-bd84-results.css?v=1f648e556779fb4921ea9f25d235efb0-93b5eae9-31' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Was this page helpful?
0 / 5 - 0 ratings