Load more posts button sometimes doesn’t work

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: not resolved
Viewing 20 reply threads
  • Author
    Posts
    • #16546

      rfischmann
      Member

      I have no idea why, but the “More” button on the bottom of our homepage sometimes works, sometimes it simply doesn’t. It shows the spinning GIF, but nothing loads.

      Any idea why?

      Thanks.

    • #16550

      rfischmann
      Member

      Just noticed this is happening to megamenus as well, maybe it’s related to Ajax support? I’ve recorded a quick video: https://d.pr/v/iCJxBj

    • #16592

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16614

      rfischmann
      Member

      It seems like the conflict is with WP Rocket, our caching plugin.

      I’ve opened a ticket with them, but if you could also test it on your side…

    • #16642

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16647

      rfischmann
      Member

      It’s very weird. Following their advice, I’ve disabled all WP Rocket’s built-in optimization/caching features and it still doesn’t work fine — only if I really deactivate the whole plugin.

    • #16702

      rfischmann
      Member

      (I’ve posted a reply here, yet another one sent to spam. Please approve it.)

    • #16701

      rfischmann
      Member

      I’ve been working with the WP Rocket guys, but we still haven’t found the cause of the issue.

      I found this possible related error log:

      [12-Jul-2019 14:34:06 UTC] Database error from WordPress Deadlock found when trying to get lock; try restarting transaction para a consulta DELETE FROM wp_options WHERE option_name = ‘_transient_newsbeat_child_dynamic_css_vars’ feita por require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/newsbeat-child/404.php’), get_header, locate_template, load_template, require_once(‘/themes/newsbeat/header-404.php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, wp_enqueue_scripts, do_action(‘wp_enqueue_scripts’), WP_Hook->do_action, WP_Hook->apply_filters, wpthmsNewsbeat\Addon\AnimationsAndEffects\Plugin->wp_enqueue_script, wpthmsNewsbeat\Addon\AnimationsAndEffects\Plugin::style, newsbeat__get_css_vars, delete_transient, delete_option

      And they last replied this:

      I’ve checked what request is being sent through ‘Load more’ button, please take a look at it:
      https://jmp.sh/WlmdTdX
      https://jmp.sh/P0cMuEe

      I believe that security and nonce might be the problem. For example, the security value changes each hour, and it needs to be correct in order to proceed with this request. Imagine that your page is cached for 2 hours and site is sending request with outdated security value. It could respond with that kind of error.

      I would definitely ask the author of this load more script about that value and compatibility with full page cache solutions. For testing purposes, I’d decrease Cache Lifetime (in the Cache section) to 1 hour and see if it helped. If so, extend it to 2 or 3 hours, check and so on.

      Please let me know if that makes sense to you.

      I’ve since set WP Rocket’s cache to last 1 hour, but the issue is ongoing and intermittent.

    • #16735

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16757

      rfischmann
      Member

      That’s, will try that. Setting it for a week is bad for security?

    • #16766

      rfischmann
      Member

      Well it hasn’t solved the issue yet, and the worst part is that it’s very intermittent. It’s not working for me right now, it might work again in 5 minutes.

      I’m not even sure WP Rocket has anything to do with it, at all…

    • #16809

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16825

      rfischmann
      Member

      But I’ve changed it to last a whole week and cleared the whole site’s cache… if that didn’t fix the issue, then it’s not the nonces. Right?

    • #16836

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16844

      rfischmann
      Member

      It doesn’t make any sense to cache dynamic pages for so long. I currently have it set for 1 hour.

      Why would a new page cache conflict with nonces? Shouldn’t it use the current generated nonce?

    • #16857

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16865

      rfischmann
      Member

      That’s why I set the cache to only last an hour, that way we know it’s not using an old nonce.

    • #16942

      rfischmann
      Member

      This is still not working as it should, it’s driving me mad.

      Do all Ajax requests need that nonce code? Do you really think that’s the issue here?

    • #16968

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #16976

      rfischmann
      Member

      Understood. I just don’t think the issue with WP Rocket might be related to that, then…

    • #17016

      rfischmann
      Member

      So I thought the other issue we had with the Insert Post Ads plugin might have been related to this one, but it is not.

      I’ve just turned off WP Rocket again so Ajax requests can work.

Viewing 20 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2019 by wpthms.com. All Rights Reserved.