Support » Plugin: WP Ajaxify Comments » First comment reloads the page

  • Resolved andy999


    Plugin is fantastic!

    I’m using it for a site I’m developing just now (locally hosted at the moment so I can’t link to it).
    Strange problem, I have my selectors all set up and it works fine ‘most’ of the time, yet the FIRST comment on any post always reloads the page.
    The second, third, fourth comments all load in via ajax just fine.

    I took some screenshots of the console with Ajaxify comments in debug mode, maybe that’ll help you diagnose what’s going on.

    Here’s a screenshot of the web inspector when the first comment (that reloads the page) is posted.

    Here’s a screenshot of the web inspector when the second comment (that loads in via ajax perfectly) is posted.

    I had to blur out the site name since it’s a client development, but all the other info is there.

    Thanks for the help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author janjonas


    Could you please send me the debug output after the comment was submitted for the first comment and before the page reloads. If you enable the debug mode, the plugin will sleep for 5 seconds to enable analyzing the debug messages before the page is reloaded.

    I just realised, when the page loads initially it’s saying “[WP-Ajaxify-Comments] Search comments container (selector: ‘ol.commentlist’)… Not found ”

    I think this is why it’s reloading the page, because initially there is no comments list since there’s no comments.

    Plugin Author janjonas


    Yes, that seems to be the cause of the problem.

    You can either modify your theme or use the JavaScript callback options ‘OnBeforeSelectElements’ to add the “ol.commentlist” element (as empty list) exactly at the position where the comments should be injected after the first comment was posted.

    Hope this helps…

    I added the list’s parent container as the element it’s targeting, it seems to be working for now.

    I was worried that it’d need a ‘list’ to inject the comments into and it couldn’t be the parent of the list.
    Hope I’m right…

    Plugin Author janjonas


    Sounds great. I will close this ticket now. If you have further problems, I need access to your site to examine the problems in detail. Please don’t hesitate to open a new thread…

    Please think about supporting the plugin by making a small donation ( or write a short review (

    Thanks in advance,

    Plugin Author janjonas



    Thanks, Jan.

    I’ll make a donation once my site goes live, your plugin is that good. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘First comment reloads the page’ is closed to new replies.