Support » Plugin: Content Mask » Not downloading CSS

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Xhynk

    (@alexdemchak)

    It looks like this is an issue with how you have the caching set up on https://brighterimagelab.com, which I expected when you mentioned it was working a few days ago.

    How long do you have the Cache set for? You may want to reduce it (or eliminate it altogether).

    Essentially what’s happening is that SYD and DVO are downloading the content which includes references to cached assets. When those assets are updated, the reference to them breaks.

    For example, SYD is referencing this stylesheet:
    https://brighterimagelab.com/wp-content/cache/min/1/wp-content/plugins/wp-video-lightbox/css/prettyPhoto-d41b022ae56a8988850e693fd4362c31.css which doesn’t exist, because the “live” one is actually this one: https://brighterimagelab.com/wp-content/cache/min/1/wp-content/plugins/wp-video-lightbox/css/prettyPhoto-ca034e44f8f091c26856d400a0a94897.css

    You’ll notice the cache keys on the file names are different, causing the issue. To prevent this, you’ll need to either:

    – Lower (or remove) the cache on SYD and DVO
    – Use the iframe method instead
    – Adjust how the caching works on BIL to prevent renaming the assets

    Let me know if you need any further assistance or clarification!

    It was a CORS issue. I have resolved the issue now.

    Resolved

    Plugin Author Xhynk

    (@alexdemchak)

    Oh interesting, the only CORS issues I saw when pulling it up were from wistia. Glad you got it figured out! Again, let me know if you need help with anything else 🙂

    I spoke too soon. It was back to doing this again. I reduced the cache time to Never Cache and was still seeing issues.

    Looking through your answer, I found the solution. In WP Rocket settings under Database, there is two checkboxes under Transients Cleanup. I checked both of those and submitted and this seemed to fix the issue.

    Thank you for your help!

    By chance do you know how I could clear the transients using a schedule like a cron job? Ideally it would only affect two sites within the Multisite setup.

    Plugin Author Xhynk

    (@alexdemchak)

    Certainly! If you take a look at the documentation for the delete_transient function, you can basically pass the name of the transient and have it delete.

    You could create a simple function that ran off a query string like

    add_action( 'init', 'clear_those_transients' );
    function clear_those_transients(){
        if( isset( $_GET['delete_trans' ) ){
            delete_transient( 'TRANSIENT_1' );
            delete_transient( 'TRANSIENT_2' );
        }
    }

    Then in your crontab, set up something like:

    0 * * * * wget "https://example.com/?delete_trans=true"

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not downloading CSS’ is closed to new replies.