-
AuthorPosts
-
August 19, 2021 at 1:36 pm #1317490
After the last updates, all our Enfold websites crash, because no stylesheet can be loaded because the MIME time of the styles is Text/HTML and not CSS.
The error message in the console is;Refused to apply style from ‘https://mywebsite/wp-content/uploads/avia_posts_css/post-3236.css?ver=ver-1628769819’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
We get this error for all generated styles. We are using an NGINX web server.
Addition: If I look in the folder wp-content/uploads/avia_post_css there is only an index.php file and no CSS files. Even after restarting the server and saving individual pages several times, no CSS files are generated in the folder.
Can you please provide a solution.
- This topic was modified 3 years, 3 months ago by conflock.
August 19, 2021 at 2:48 pm #1317508One more addition. We have changed the server headers to remove the “nosniff” security rule. Now there is only a normal 404 error, because the CSS files were not generated.
August 20, 2021 at 9:28 am #1317586Hi,
Sorry for the problem. Did you check the file permissions settings for the avia_posts_css folder? Also, could we see this happening on a live site somewhere?
Best regards,
RikardAugust 20, 2021 at 2:06 pm #1317637See credentials in private content. It’s not possible to change the standard permissions for WP just for your theme!
August 23, 2021 at 1:07 pm #1317962No answer and no support for more than 3 days now. Our websites are all broken for more than 5 days now! It seems like your theme does not work on NGINX hosting anymore. Please provide a solution!!!
- This reply was modified 3 years, 2 months ago by conflock.
August 26, 2021 at 6:22 am #1318380Hi,
Sorry for the delay. To temporarily fix the issue, please disable the Enfold > Performance > File Compression settings, the cache and minification/compression plugins temporarily, then add this filter in the functions.php file to skip generation of the post css files, and add it as inline styles instead.
/** * Filter to skip css file generation. * You can add logic to skip for certain pages/posts only. * * @since 4.8.6.1 * @param boolean $create * @return boolean true | false or anything else to skip generation of css file */ function custom_avf_post_css_create_file( $create ) { return false; } add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );
Do not forget to purge the cache (if still enabled) and remove the browser history before checking page. Let us know how it goes. The following thread might also help clear things up.
// https://kriesi.at/support/topic/post-css-and-caching-issue/#post-1316048
Thank you for your patience.
Best regards,
IsmaelAugust 26, 2021 at 1:39 pm #1318462I did everything and added the code to my functions.php. Cache PlugIns are all deactivated, but still the same errors. No change at all. We still get 404 errors for all CSS files!
Please help us! Many websites are down for over a week now, and we’re not getting quick support! Enfold is one of the biggest WP themes. I can’t believe that you are not able to fix such a major bug that breaks the whole system.
August 26, 2021 at 9:52 pm #1318514We are having a similar issue with the avia css broken links. The website is up and running, but reports are showing a bunch of avia_css links that are missing. I’ve added links to screenshot in Private Content. Any idea what is causing it? Should we roll back Enfold two revisions? We upgraded to the latest version 4.8.6.2 today, but the reports occurred with the last version of Enfold installed. Please advise. Thanks.
August 27, 2021 at 6:15 am #1318573Hi conflock,
You are the only user having this problem, that I’m aware of. The filter which Ismael posted has worked for all other users, where the new folder structure which was added in 4.8.4, does not have the correct file permissions. We can help you to roll back to 4.8.3 if you like, or you can use the files in private. If you need help with rolling back, then we would need FTP details as well, and a verification that you have backups of your site.
I would recommend that you update on a staging site first in the future. If you do, then you will never introduce problems on your live site, and you won’t need panic solutions either.
Best regards,
RikardAugust 27, 2021 at 6:16 am #1318574Hi GWS,
Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.
Best regards,
RikardAugust 27, 2021 at 2:29 pm #1318651Are you kidding me? I gave you the admin info a week ago! See this thread!
And as you can see, I’m not the only user with this problem! The folder rights are correct and some CSS files are written to the folder, but the wrong ones!!! Is that your way of giving support?
August 30, 2021 at 4:14 am #1318879Hi,
@conflock: Sorry for the confusion. @rikard is actually asking the other user (GWS) to open a new thread so that we could focus on yours. We checked the site and found out that an older version (4.8.3) of the theme is still active. Is there a staging or development version of the site containing the latest version (4.8.6.1)?
Please try to use the latest version of the theme (4.8.6.1), then add the snippet or filter that we provided above to prevent the post-css files from being generated. You may need to toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the filter and make sure to purge the cache, or disable the plugin temporarily.
Best regards,
IsmaelAugust 30, 2021 at 2:10 pm #1318972We have searched for hours over the weekend, and we now believe we have found a solution. The error seems to occur when the PlugIn Cache Enabler was installed before the update.
After updating to the current Enfold version, it is no longer possible to clear the cache on NGINX servers, even when deactivating or even uninstalling it, and so the new CSS files are not found. Only after we have manually changed in the WP Config the line
define( ‘WP_CACHE’, false );
in the WP Config, the update works. Afterwards, you can install the Cache Enabler plugin again and set the cache in the WP Config file to “true”.
September 1, 2021 at 8:10 am #1319297Hi conflock,
Great, I’m glad that you found a solution for your problem, and thanks for sharing the solution.
And for clarity in the future; if my message begins with Hi conflock,, it’s addressed to you. You can at least try to read what we actually write before asking if we are kidding, and criticising our support.
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.