Tagged: 

Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #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.

    #1432897

    Hey 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,
    Mike

    #1433283

    Hi 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?

    #1433303

    Hi,
    So are you saying that on your staging site with no cache there is no issue?

    Best regards,
    Mike

    #1433421

    Hi 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/

    #1433456

    Hi,
    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,
    Mike

    #1434277

    Hi,

    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:

    #1434305

    Hi,
    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,
    Mike

    #1434313

    Hi 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?

    #1434357

    Hi,

    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,
    Ismael

    #1434366

    Hi 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.

    #1434465

    Hi,

    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,
    Ismael

    #1434856

    Hi Ismael,

    I have created a staging environment.
    The info are in the private content.

    #1435139

    Hi,
    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,
    Mike

    #1435413

    Hello 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.

    #1436325

    Hello,

    Are there any updates to this one? :-)

    #1436427

    Hi,
    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,
    Mike

    #1436928

    Hi,

    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.

    #1436934

    Hi,
    Is that on your live site? You wrote that you couldn’t recreate the issue on your staging site.

    Best regards,
    Mike

    #1436935

    Hi 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.

    #1436939

    Hi,
    Ok, earlier you wrote that you couldn’t create it on your staging site.

    Best regards,
    Mike

    #1436940

    Hi,

    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?

    #1436942

    Hi,
    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,
    Mike

    #1436943

    Okay, 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.

    #1436965

    Hi,
    The only way you’ll know is if you try it. Try it on one of your sites.

    Best regards,
    Mike

    #1436967

    Hi Mike,

    I have try added it to two websites, we did it 7/3 and haven’t had any issue with those two.

    #1438315

    hi 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,
    Jason

    actually, 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 7 months, 3 weeks ago by Jason.
    #1438321

    Hi,

    @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,
    Ismael

    #1438395

    brilliant @Ismael – I appreciate that explanation

    #1438413

    Hi,

    No problem! If you have any more questions about the theme, please feel free to open another thread.

    Have a nice day.

    Best regards,
    Ismael

Viewing 30 posts - 1 through 30 (of 30 total)
  • The topic ‘Dynamic CSS’ is closed to new replies.