• Hi,

    Great app!

    Have one minor problem related to it on https://www.hiddendominion.com

    When I first publish a new article, the page breaks. By “break” I mean the entire theme (JS or CSS maybe) is not loaded. It’s just strict text on the left side. So images, sidebar, theme, nothing. So, it’s the typical text only “page-break”. Now I use WP super cache and varnish, so there may be a conflict.

    However, as soon as I empty the AO cache, it looks perfect. But this means every time I write a post, it looks terrible until I can empty the cache. It does not seem to effect ANY posts in the past, just immediately newly published ones.

    Oddly, this does not happen when i’m logged in as an admin. I have it set to show admins only uncached pages.

    I check to make sure it looks good in a different browser as an anonymous user. And obviously, it never does until I empty the cache.

    So what I’m imagining is happening is that the WP super cache and AO is running into a conflict.

    Do you have any recommendations on how I could fix this? Or if I should just try and find a way to auto-empty autooptimize cache on new post?

    Thanks for your time.

    HD

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter valhalla1

    (@valhalla1)

    Sidenote: Forgot to add, I have Varnish and WP Super Cache setup to automatically clear their caches on new post. I noticed AO doesn’t have a setting for that, so maybe that has something to do with my problem?

    Thanks again!

    Plugin Author Frank Goossens

    (@futtta)

    morning @valhalla1;
    interesting problem 🙂

    The “Clear all cache files when a post or page is published or updated.”-option in WPSC actually removes everything in wp-content/cache, including the autoptimize cache. I’ve tried reproducing your bug, but have not been able to, but I don’t have Varnish on my setup so that might have to do with it.

    But the fact that all posts work except the newly published one seems to indicate that the new post (and it’s JS/ CSS) is cached (in Varnish) _before_ the AO-cache gets removed (by WPSC). So if you are in fact first purging Varnish and then WPSC, try switching and see if this changes anything?

    hope this helps,
    frank

    Thread Starter valhalla1

    (@valhalla1)

    So if you are in fact first purging Varnish and then WPSC, try switching and see if this changes anything?

    Do you have any recommendations on how to accomplish this? Will I need to add some code into htaccess to tell varnish to wait for a certain timeframe before purge? Tried googling – not much help on how to delay the purge.

    Thanks for the help! I think that would help it.

    Plugin Author Frank Goossens

    (@futtta)

    I’m not familiar with Varnish myself I’m afraid, how do you make sure its cache is purged? Have you tried purging it manually after the problem arises?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem With Newly Published Posts Breaking Theme Script’ is closed to new replies.