Viewing 30 posts - 1 through 30 (of 43 total)
  • Author
    Posts
  • #1439133

    Hello,

    I had another thread that have been closed but it is not completed: https://kriesi.at/support/topic/dynamic-css/

    Today we experiencethat min. 5 websites lost their styling and we even tried to add the function that you guys suggested but it did not fix it until we cleared cache.

    Can you please take a look at this again?

    #1439143

    Hey mvi,

    Thank you for opening another thread.

    Could you please share a link to one or two of the sites where this issue is occurring? Also, include the login details in the private field.

    Have you tried to disable the default compression settings from the theme and instead enable the compression options available in the cache plugin? Enabling both options might be redundant and could potentially lead to issues.

    Best regards,
    Ismael

    #1439166

    Hello Ismael,

    I have added the login details in the private field.

    The CSS File Merging And Compression are set to: Disable – no CSS file merging and compression
    The Javascript File Merging And Compression are set to: Disable – no Javascript file merging and compression

    #1439178

    Hi,

    Thank you for the info.

    The site seems to be rendering correctly when we checked. The dynamic css are loaded as expected. Would you mind providing a screenshot of the issue? You can use platforms like Savvyify, Imgur or Dropbox to upload and share the screenshot. Here are the steps to follow:

    1.) Visit the website of your chosen platform, such as Savvyify, Imgur or Dropbox.
    2.) Locate the option to upload a file or an image.
    3.) Select the screenshot file from your computer or device and upload it to the platform.
    4.) After the upload is complete, you will be provided with a shareable link or an embed code.
    5.) Copy the link or code and include it in your message or response to provide us with the screenshot.

    Thank you for taking the time to share the screenshot. It will help us better understand the issue you’re facing and provide appropriate assistance.

    Best regards,
    Ismael

    #1439190

    Hi,

    Yeah i see that it is working now.
    It is probably because the caching have been cleared. It do that after some time.

    I can send a new website when we spot it and i will do what you ask me in above steps.

    Best regards,
    Morten

    #1439210

    Hi,

    Thanks for the update, we’ll keep this thread open for you.

    Best regards,
    Rikard

    #1441556

    Hi,

    So we are now seen this issue again. I post some of the websites that have the issue in the private content.
    Can you take a look at them?

    #1441597

    Hi,

    All the site you posted in your last reply are loading the styling fine on my end, how can we reproduce the result you are seeing on your end?

    Best regards,
    Rikard

    #1441599

    Hi,

    The problem is the issue get fixed if the cache are been cleared.

    I have talked with our host that says this:
    what happens is that the Enfold theme/plugin generates a CSS file, the page cache is then created during a visit and this cache contains a link to the CSS file.

    The theme then randomly changes either the path or the name of the CSS file but the cache isn’t cleared so the site shows broken.

    If you check one of those files you’ll see that they no longer exist:https[:]//webiste-name[.]com/wp-content/uploads/dynamic_avia/avia_posts_css/post-14[.]css?ver=ver-1711102485

    So you need to check in with theme support or developer for an option that disables the dynamic file creation 🙏 This is not something that can be done on our side, as it is an issue with the theme itself 🙏

    #1441821

    Hi,

    When the theme options are saved, then the theme resources are regenerated. There is nothing random about it. If you want to remove the version number and time stamp from the CSS files, then you can do so under Enfold->Performance->Show Advanced Options. If you want to disable the post CSS file creation, then you can add this to your functions.php file:

    /**
     * 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 );

    Best regards,
    Rikard

    #1441930

    Hi,

    Which one of the settings should i choose (see link in privat ssection) and should i also add the script that you posted or would i be enough to disable the timestamps?

    #1441986

    Hi,

    Query strings are under the Remove Query String From Static Resources option, and I can’t really tell you what you should or should not do with the post CSS snippet. If you don’t want separate CSS files for each post, then please add it.

    Best regards,
    Rikard

    #1441991

    Hi Rikard,

    I’m not sure what you are writing about here.

    1. The script you mention i can add to the functions.php, how will that help that the websites losing the styling?
    2. The image i posted, which one would you suggest to use if i wan’t it not to add unique timestamps, and it is because of that the styling are missing?
    3. What are this “Remove Query String From Static Resources option”?
    Why should i do that, and should i combined to disable it which the other things above?

    I can figure out what solution should fix the issue.

    #1442082

    Hi,

    I think it’s wrong to call this an issue, since clearing cache is something you should do every time some sort of styling has changed on your site. Most of the settings in Enfold are styling settings, and cache should be cleared after something has been changed. If you don’t want to clear your cache for whatever reason, then I would suggest that you remove the query string first of all to see if that achieves what you are looking for. If not, then we’ll take it from there. Query string are the characters which are added after the file name.

    Best regards,
    Rikard

    #1442086

    Hi,

    I will call it an issue since this happens randomly on our pages.
    So we do not make any changes it just happens out of the blue and yes it get fixed when we clear the cache and we have set our server up up to clear cache every hour but if a client get into the website in that hour where it haven’t be cleared and see this they will ask questions.

    Normally we manually clear cache when we make changes, so i agree to clear the cache if changes have been made.

    I will try test to remove Query string from some of our websites and try some others which the function you wrote may 2.

    I will get back to you if nothing works :-)

    #1442177

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

    #1448966

    Hi,

    So i now tried with both solutions and i still get sites that are missing all the styling, what can we now do?
    I have shared website and screenshot of what i see.

    #1450617

    Hi,
    Thank you for your patience, I checked the sites that you linked to but I found no errors like your screenshots.
    In your original thread using the avf_post_css_create_file snippet seemed to help you and two other users.
    It also seem to be due to a server setting: X-Content-Type-Options “nosniff” another user found that when they change this on their server the issue was solved. But as I recall you can not change this on your server, so you should use the avf_post_css_create_file snippet.
    I am unable to reproduce this issue even if I change the server settings to: X-Content-Type-Options “nosniff” so it seems that only certain servers have this error and it doesn’t seem to be directly a result of the theme settings but how the server handles X-Content-Type-Options “nosniff”

    Best regards,
    Mike

    #1451611

    Hi Mike,

    Thank you for getting back to me. It get fixed when the cache have been cleared so that maybe why you can see the error on the live website, thats why i add the screenshots of it and the error.

    But i can say that using the avf_post_css_create_file snippet do not fix it, because i have tried test it on some sites and they get the error and i tried on some other sites use remove query string and tiemstamps and they do also get this error.

    So i need a another solution to this.

    #1451617

    Hi,
    Try having your webserver disable X-Content-Type-Options “nosniff”, this seems to be the root of the problem.

    Best regards,
    Mike

    #1451845

    Hello,

    So i talked with our hosting provider and they response to your disable X-Content-Type-Options “nosniff” are this:
    Disabling this header would expose your site to potential security risks by allowing browsers to guess the MIME type of files, which can lead to unintended behavior and vulnerabilities such as XSS attacks.

    And I’m afraid we will not disable it from the server end for security purposes.

    They do also say this after a dialogue:
    The theme developers should be working with you on solving this and checking compatibility with other plugins

    it’s a good idea to check further with the theme devs and tell them besides disabling that header we are happy to help with other tests or check logs if they need us to

    So are this something you can look into?

    #1452069

    Hi,
    I reviewed the other thread with the solution and see that they didn’t disable the X-Content-Type-Options “nosniff” they only changed it from being in the nginx http and https directives additional headers box in plesk apache and nginx settings but instead are in the htaccess file.
    Try asking your webhost to try this, the nosniff is still activate but in a different way. Perhaps they will understand this better and can adjust your server settings to suit.
    The theme can not make these changes to your server and thus can not correct the error that the web browser is having with the server.
    From our research there has only been three examples of this issue from the thousands of activate users using Enfold and the other two both found this code in their functions.php to solve:

    function custom_avf_post_css_create_file( $create ){
      return true;
    }
    add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );

    Best regards,
    Mike

    #1452345

    Hi,

    So i have talked with our host again and regarding to the “Nosniff” thing they say this:
    We don’t use plesk nor apache, so no htaccess. We do use nginx and that ‘nosniff’ header is, I’m afraid, unalterable.

    The function that you mention do not work, i have tried insert it on some pages and the issue still occurs and even if i changed the performance settings:
    1. Unique Timestamp Of Merged Files And WP Object Cache Bug -> Fix WP bug, disable unique timestamps
    2. Remove Query String From Static Resources -> Remove query strings

    We can see in the console that the issue always are this URL: “/wp-content/uploads/dynamic_avia/avia_posts_css/post-555.css?ver=ver-####”
    #### are a different number each time.

    And we can see that AVIA post are some from /themes/enfold/ so it is a theme issue and i need you to look further into this because our solution do not work.

    They did also say this
    “We (our host and us) found an issue on site X at this time.
    Kinsta tech jump on the site – he found the error on the console:
    “MIME type error” and clicked on the CSS link in that error – which showed a 404 page (which explains the MIME type as the page is not CSS).
    He then jumped onto the server where the actual file in question was not found
    “Screenshot 1”
    During investigations the cache was invalidated (expired) and the site ‘fixed itself’ and was working without intervention – the tech at Kinsta then checked and the file was there again.
    “Screenshot 2”
    “stat screenshot”

    #1452890

    Hi,
    Thanks for the feedback, but it looks like the filter was not enabled:

    function custom_avf_post_css_create_file( $create ){
      return true;
    }
    add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );

    if this was enabled the css files in the screenshot would not be present, please put the filter in and try again.

    Best regards,
    Mike

    #1452903

    Hi Mike,

    As i mentioned before I have tried the function on other sites and the issue are still happening.

    I posted a site in the private section that have had the issue 3 times and 2/3 times were after i added it.

    The site x in the previous comment were just a other site we found and our host could test on it while the issue were there.

    #1452938

    Hi,
    Perhaps you have made an error in adding this filter, please include an admin login in the Private Content area so we can check.

    Best regards,
    Mike

    #1458645

    Hi,

    I have created a login for you.
    This site have had the issue 3 times

    #1459801

    Hi,
    Thanks, I see the filter in place, but I don’t find the post-css or this error on your site.

    Best regards,
    Mike

    #1459816

    Hi Mike,

    As mention the issue happens randomly so you need to monitor the site, because we can recreate the issue.

    What post css? We have our child theme for extra styling but the dynamic css are from the parent theme.

    If the filter are placed correctly, it do not work because the site still have had the issue.

    #1460018

    Hi,
    Thanks, I checked the site again today and do not see the error. I will check again in a day or two.

    Best regards,
    Mike

Viewing 30 posts - 1 through 30 (of 43 total)
  • You must be logged in to reply to this topic.