• Resolved poudanet

    (@poudanet)


    Hi,

    I’m facing some display problems lately with few of my website.
    It looks like some pages don’t download their css and display raw (no images, no style, not the right font…)
    It all comes back to normal as soon as I purge all pages.
    But the problem keeps coming back.

    What’s happening?

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter poudanet

    (@poudanet)

    …I’m using Divi on those websites, maybe there is a compatibility problem?

    Hi,

    I was going to ask if you’re using a minify plugin, or Divi.
    So that would be Divi.

    Depending on the settings, Divi regenerates all CSS files (and changes their name) when saving a post or page. This means that all the cache should be cleared at that moment.

    In order to purge all cache when saving, you can set the filter wpo_purge_all_cache_on_update to true:

    The simple way (add this to your child theme’s functions.php or to a mu-plugin):

    add_filter( 'wpo_purge_all_cache_on_update', '__return_true' );

    If you need more control:

    add_filter( 'wpo_purge_all_cache_on_update', 'my_site_purge_all_cache_on_update', 20, 2 );
    function my_site_purge_all_cache_on_update( $purge_all, $post_id ) {
        // using $post_id you can check if this post requires purging the whole cache
        return true; // the desired value
    }
    

    Marc.

    • This reply was modified 5 years, 3 months ago by Marc Lacroix. Reason: Clarify location
    Thread Starter poudanet

    (@poudanet)

    Many thanks for your reply.

    For the simple way, should I add it to the function.php file?

    Yes sorry, I forgot to say that.

    Thread Starter poudanet

    (@poudanet)

    OK. I’ll do that.

    But, I’ve been using WP-O for a while and never had this problem until recently. Do you have an idea why?

    Thread Starter poudanet

    (@poudanet)

    There is these 2 options on Divi settings :

    Minify And Combine Javascript Files
    Minify And Combine CSS Files

    De-activating these 2 would do the trick or this has nothing to do with the problem?

    I looked into this not long ago, and couldn’t actually stop it from happening. But these 2 settings do play a role, but there are other ones as well:
    In “Divi Theme Options” > Builder > Advanced, Static CSS File Generation will generate those files that are missing.
    Choosing “Output Styles Inline” might fix the issue, as in that case the styles would be included in the cache.

    Thread Starter poudanet

    (@poudanet)

    ok. I’ll stick with your filter on the function.php file and see if that’s happening again.

    Many thanks for your help

    Thread Starter poudanet

    (@poudanet)

    Hi,

    Unfortunetly it’s happening again.

    Although I have disabled the 3 options on Divi and added your code on my child theme’s functions.php.

    Any other idea?

    Thx

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Website Display Issue’ is closed to new replies.