• Sharif Payenda

    (@sharifpayendagmailcom)


    What I noticed that plugin actually works for posts with less comments but it does not work in posts with alot of comments. For example: I tried on scroll and on click options for posts with three, ten and twenty comments and it worked just fine but when I tried on scroll and on click options for a post with more that fifty comments the plugin was not able to load comments. Maybe this is the problem some other users are also reporting in previous topics but I see they have not mentioned the exact bug what I have seen that is why I created a seperate support topic.
    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m experiencing the same problem. This plugin seems to have some kind of memory/capacity limit and does not work for posts with more than X amount of comments. The amount probably depends on your server specs.

    For me, testing on a local server, I found it worked fine for any posts with 105 or fewer comments. But for all posts with 106 or more comments, the comments do not show up at all. If set to load on scroll, nothing happens. If set to load on click, the “click to load comments” button displays, but clicking yields nothing. No console errors, no PHP or debug errors, it just doesn’t work. And yes this testing was done with the default WP TwentySeventeen theme and no other plugins active.

    UPDATE: after further investigation, I don’t think it’s actually related to the number of comments. It’s actually that this lazy load comments plugin has code set to not display the comments template AT ALL if comments are closed. I believe this to be a bug, or at least not the desired behavior most users would want.

    My client sometimes closes comment threads, and often those have many comments and the discussion is worn out. But, just because comments are closed doesn’t mean we want to hide the existing comments from view of all users. Currently Lazy Load for Comments chooses to not display any comments if comments are closed.

    I had to manually update your plugin to fix this on my client’s site, in this file:
    /public/class-llc-public.php
    (line 232)

    remove this whole block:

    elseif ( ! ( have_comments() || 'open' == $post->comment_status ) ) {
    // If comments are not available, abort.
    $can_lazyload = false;
    } 

    When I remove that block, it works as I’d want it to. With that block of code intact, posts with 243 comments are displaying absolutely nothing where comments should be.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin not working in a post with alot of comments’ is closed to new replies.