• Resolved ahetzel

    (@ahetzel)


    Hello! I installed v1.3.8 just before the holidays and was delighted to see it improve performance and remove the “you should use a persistent object cache” error in WP Site Health. Unfortunately, it’s now a few week later and I was informed that my contact page was failing. I tried it and received the error message, “Please refresh the page and try again.” Odd, I though, since I tested its functionality immediately after activating the plugin.

    This is not a unique problem. I found a discussion of the same issue here relating to W3 and WP Fastest Cache, here. Although I do not understand the issue and its discussed solutions at the links above, I recognize that this appears to be related to a “nonce” issue, where the cache must be reset every 24 hours for the page to continue working. Assuming that interpretation is correct, is there anyway to exclude my contact page/form from persistent object caching or alternatively to flush the cache automatically every 8-12 hours and not trigger the issue? Flushing it manually corrects the problem, as is referenced in the linked discussions but I’m not going to login and do that every day.

    FYI, SQLite is disabled on my site right now, in case anyone looks at the contact form.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author OllieJones

    (@olliejones)

    Thanks for the defect report.

    It seems likely there’s a defect in that Divi contact form’s code. Specifically, if they store a nonce in the cache or in a transient, they should set the lifetime appropriately, rather than ask for the object cache to be monkey-wrenched to purge older but non-expired entries. I’ll investigate.

    The object cache subsystem cannot tell which pages or REST requests are being rendered, so there’s no way to exclude certain pages.

    Thread Starter ahetzel

    (@ahetzel)

    Thank you, Ollie!

    I’ll open a ticket with Elegant Themes and present the same evidence. Maybe they’ll fix it, but probably not. If your magic can find a workaround, it will be appreciated.

    Andrew

    Plugin Author OllieJones

    (@olliejones)

    I took a look at some Divi source code, and sent them a message. I had to use the Sales message form because I am not a Divi customer. There’s a place in their core/init.php:193 where they flush the persistent object cache — delete everything in it — with wp_cache_flush(), but only if wp.com / Pressable’s batcache is active.

    That doesn’t seem right to me. Batcache is a page cache, not a persistent object cache.

    And, if a persistent object cache is in use, transients go into it and not into the wp_options table. So flushing the persistent object cache has the undesired, effect of deleting all transients. Is it possible that a nonce is somehow stashed in a transient, which then is untimely deleted?

    (I hope the Divi person who investigates this will look at this thread.)

    • This reply was modified 2 months, 1 week ago by OllieJones.
    • This reply was modified 2 months, 1 week ago by OllieJones.
    Thread Starter ahetzel

    (@ahetzel)

    Hi Ollie, I experienced more problems with the Divi contact module unrelated to your plugin, so I solved it another way: swapped it out with the WP Forms plugin and re-enabled the persistent object cache. It’s working great. Thanks again.

    Plugin Author OllieJones

    (@olliejones)

    OK, then; I hope they notice this issue. Divisors (or whatever you Divi folks call yourselves) please reach out if I can help you isolate or fix this bug. (Hint: error_log() calls in certain spots in the cache drop-in can give very helpful data if you’re trying to find a wayward cached item.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.