• After installing the JCH optimize plugin and using the premium setting on the combined CSS and JS files an erratic bug has appeared. Sometimes when a user loads the page the stylesheet will not load properly and the page will only be blue text aligned on the left side without any CSS.

    The site is hosted on WP Engine which uses it’s own caching that cannot be disabled, so I’m concerned this plugin may not be able to function when hosted on WP Engine.

    I’ve cleared both the cache on JCH Optimize as well as the WP engine cache and that gets rid of the bug, but only for a few days. It eventually works its way back and becomes prevalent.

    Has anyone dealt with this issue or something similar? Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codealfa

    (@codealfa)

    Try to set the cache lifetime on the JCH Optimize files to a time that is much longer than the lifetime of the Cache set on WP Engine.

    JCH Optimize will delete its cache after they’ve expired so I suspect that the files were deleted but the links to the files were still cached on the page on WP Engine.

    Setting the lifetime of JCH to a longer time (at least twice) mitigates the chances of deleted files being cached.

    I am facing a similar issue but in my case setting the lifetime of JCH cache to longer time did not fix it, neither to clean cache on on JCH Optimize or WPEngine.

    What I am seeing on my site, when I open the DevTools and inspect the JCH files, is the error message: “File [/nas/content/live/[myenvironment]/static/[mycssfile].css] not found”. How is that path being obtained and how can I validate its integrity.

    If I disable the JCH plugin then everything works just fine.

    • This reply was modified 3 years, 1 month ago by jgsanchezg.
    Plugin Author codealfa

    (@codealfa)

    If clearing the cache doesn’t resolve the issue then I’m afraid this is a different issue to what was described.

    The path you described doesn’t look familiar. It seems that the plugin is having trouble locating a file on the server. Perhaps this file is a dynamic file that was rewritten using url rewrite to look like a static file so you wouldn’t find a file at the location pointed to by the path.

    Try excluding this file from the plugin and see if that works.

    • This reply was modified 3 years, 1 month ago by codealfa. Reason: Typo
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Stylesheet loading bug’ is closed to new replies.