Tagged: dynamic css
-
AuthorPosts
-
February 2, 2024 at 8:29 am #1432796
Hello,
We are facing some issue with the dynamic CSS, that are giving our +500 websites styling issues.
Our Host are saying this:
“The best would be to ask them if they do have Dynamic CSS and if so, can it be disabled as it is causing issues with cache.”So can this be fixed, without to clear the cache?
The styling of the websites are working again after clearing the cache, but we cant do that on +500 websites and it is only a temporary fix.February 3, 2024 at 9:00 pm #1432897Hey mvi,
It sounds like you are having a server cache issue, perhaps from a object-oriented cache? We have not experienced any issues on our servers or any reports from other users that we can reproduce. You could try changing the Enfold Theme Options ▸ Performance ▸ JS & CSS file merging and compression to Use minified theme CSS files without merging or disable it completely and let your server do all of the caching, but you would need to do this for each site, there is no other way to do this.Best regards,
MikeFebruary 6, 2024 at 3:28 pm #1433283Hi Mike,
In Enfold Theme Options ▸ Performance ▸ JS & CSS file merging and compression it have already been set to disable and we have also tried to set it to without merging.
We have also tested it on a staging site that have no cache and here there are no issue.
What else can we do, to fix this?
February 6, 2024 at 4:55 pm #1433303Hi,
So are you saying that on your staging site with no cache there is no issue?Best regards,
MikeFebruary 7, 2024 at 8:28 am #1433421Hi Mike,
I can see that others are facing the same issues that we have see this thread: https://kriesi.at/support/topic/404-error-loading-wp-content-uploads-dynamic_avia-enfold-css-on-fresh-install/
February 7, 2024 at 12:14 pm #1433456Hi,
The thread that you have found in from 2019, and includes the solution at the bottom, did you try it?
Your last post was:We have also tested it on a staging site that have no cache and here there are no issue.
So it sounds like you are saying that on your staging site there is no issue, is this correct?
Best regards,
MikeFebruary 14, 2024 at 11:45 am #1434277Hi,
Sorry yes that are an old ticket.
But yeah no issue on the site, but our host says this:
if dynamic CSS setting can be disabled, as well as are there any specific settings for the cache needed to work with Kinsta cache ? 🙏 We can exclude certain pages or cookies from caching if needed. Please also send this screenshot as example:February 14, 2024 at 5:24 pm #1434305Hi,
I don’t know what specific settings Kinsta would require, the screenshot that you posted shows a error the MIME type text/html is not supported, this is a server/htaccess error themes don’t set the allowed MIME types.Best regards,
MikeFebruary 14, 2024 at 6:58 pm #1434313Hi Mike,
Kinsta are saying:
“Regarding the error “the MIME type text/html is not supported” it depends on which of the content is throwing that error.If it is a JS script for instance, then the error is legit as a JS file is not of a text/html MIME type.
And that MIME type is set in the file styles, so definitively a code issue.
Can you ask which resource is throwing the mime type error?
February 15, 2024 at 4:12 am #1434357Hi,
Based on the screenshot, the mime type error is generated from a minified stylesheet inside the wp-content > fusion-styles folder. Did you install another page builder or compression plugin?
Best regards,
IsmaelFebruary 15, 2024 at 8:05 am #1434366Hi Ismael,
We use Enfolds builder and the only plugins that have something to do with compression are our images optimizer plugin – ShortPixel Image Optimizer.
Otherwise we do not have other plugins because GTM4WP, Yoast and other like that.But the problem is it not that it generate dynamtic css and it can’t load it?
Correct me if i’m wrong.February 16, 2024 at 2:19 am #1434465Hi,
Thank you for the info.
But the problem is it not that it generate dynamtic css and it can’t load it?
The screenshot above shows an error originating from a minified stylesheet within the wp-content > fusion-styles folder, not from the dynamic stylesheet generated by the theme. We may need to access the site in order to properly check the issue. Please clone the site to a staging environment and provide the login details in the private field.
Best regards,
IsmaelFebruary 20, 2024 at 7:50 am #1434856Hi Ismael,
I have created a staging environment.
The info are in the private content.February 22, 2024 at 5:33 pm #1435139Hi,
Thanks for your patience, I checked your staging site and enabled the theme File Merging And Compression, but I don’t see any MIME type errors, I also checked your live site and it looks like the File Merging And Compression is enabled there but I don’t see any errors.
Above you wrote that after clearing the cache the errors don’t show for a while, so perhaps this is the case.
I see that your Header is set with X-Content-Type-Options “nosniff”
Is your server type a Plesk or similar? Try finding out if mod_headers rule:
Header set X-Content-Type-Options "nosniff"
is added to your server header directly, or if is added to your .htaccess file, if it is not in your .htaccess file try removing it completely and then test or move it to your .htaccess file.Best regards,
MikeFebruary 26, 2024 at 10:49 am #1435413Hello Mike,
Here are our host reply:
The header can not be removed since it is in our default config, but it should not have to do anything with the issue, and all of our customers has it without those kinds of issues.March 5, 2024 at 7:53 am #1436325Hello,
Are there any updates to this one? :-)
March 5, 2024 at 11:41 pm #1436427Hi,
Thank you for your patience, we have had some feedback from another user with this issue and after much testing were we can not reproduce the error he has checked the settings on his server and reports:I have not used the additional headers box in plest apache and nginx settings.
Instead I have added the nosniff to the nginx, http and https directives.and this seems to have caused the error, he is testing further to confirm.
I know that you said that you are not able to make any changes to your server, and when you created a staging site you didn’t experience the same issue.
Perhaps you could try this snippet in your functions.php: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 );
Best regards,
MikeMarch 11, 2024 at 9:24 am #1436928Hi,
Just talked with our hosting and they ask how do we know if this function works?
We can recreate the error and if the cache is clearede the issue are gone.March 11, 2024 at 10:36 am #1436934Hi,
Is that on your live site? You wrote that you couldn’t recreate the issue on your staging site.Best regards,
MikeMarch 11, 2024 at 10:38 am #1436935Hi Mike,
We have this issue on all our websites and it comes and goes.
So yes it is on live but we can recreate it on a staging site.March 11, 2024 at 11:07 am #1436939Hi,
Ok, earlier you wrote that you couldn’t create it on your staging site.Best regards,
MikeMarch 11, 2024 at 11:10 am #1436940Hi,
Yeah we can recreate the issue either if it is staging or live site.
Si my question are that how can we make sure that the function will work?
And if you have another one with the same issue, could it not be theme related since we are not using same hosting provider?March 11, 2024 at 11:27 am #1436942Hi,
This was caused by a server setting, if it was caused by the theme we would be able to reproduce this. Unfortunately we don’t have any other ideas to assist you with your specific server issue.Best regards,
MikeMarch 11, 2024 at 11:28 am #1436943Okay, but how do we know if this Function works?
We have +800 sites and if we add it to all of them and it do not work, it will be a waste of time.March 11, 2024 at 3:58 pm #1436965Hi,
The only way you’ll know is if you try it. Try it on one of your sites.Best regards,
MikeMarch 11, 2024 at 4:00 pm #1436967Hi Mike,
I have try added it to two websites, we did it 7/3 and haven’t had any issue with those two.
March 26, 2024 at 1:36 am #1438315hi Mike,
i’ve been having issues with dynamic css as well, and that code snippet you provided seems to have fixed those issues, with this particular site.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 );
can you please provide a little detail on what that code does & why it may have been required?
thanks heaps,
Jasonactually, i might just give you a little more info on my setup.
it’s a plesk server running nginx & redis object cache.
i’m actually using wp-rocket for the front end caching side of things (i don’t have much switched on).
to complicate matters more(?) dns is with cloudflare, so i also have to periodically clear the cache there.
no performance settings enable in enfold.- This reply was modified 8 months, 3 weeks ago by Jason.
March 26, 2024 at 7:17 am #1438321Hi,
@Jason: The filter (avf_post_css_create_file) mentioned above disables the generation of the dynamic posts css file, which contains css rules for builder elements on a specific page. Custom styles will be added inline instead of a separate posts css file.
Best regards,
IsmaelMarch 27, 2024 at 3:54 am #1438395brilliant @Ismael – I appreciate that explanation
March 27, 2024 at 8:15 am #1438413 -
AuthorPosts
- The topic ‘Dynamic CSS’ is closed to new replies.