WordPress.org

Forums

WP Ajaxify Comments
[resolved] Ajax reloading with link to parent comment on paged comments? (13 posts)

  1. Mr Press
    Member
    Posted 1 year ago #

    I am using paged threaded comments (two level deep) where comment replies show a link back to the parent comment above like:

    <a href="http://testsite.net/2014/04/22/a-new-post/comment-page-1/#comment-56">@Pete</a>

    When clicking this link there is a reload in the browser from the original URL http://testsite.net/2014/04/22/a-new-post/, as opposed to when the comments are non-paged, when clicking the link immediately jumps up to parent comment:

    <a href="http://testsite.net/2014/04/22/a-new-post/#comment-56">@Pete</a>

    Is this something that can be corrected with the plugin settings at all? I think I had this working the way it should with older versions of the plugin, but I am not completely sure.

    I suspect someting changed in the plugin or in my setup to make it break since the ajax reload between comment pages works as it should without the browser reloading:

    <a href="http://testsite.net/2014/04/22/a-new-post/comment-page-2/#comments>2</a>

    https://wordpress.org/plugins/wp-ajaxify-comments/

  2. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    This should work, but the plugin may needs to be configured depending on your theme.
    You can enable plugin's the debug mode and take a look into the browser console. If this does not help, please provide me a link to your page where I can reproduce the problem...

  3. Mr Press
    Member
    Posted 1 year ago #

    Thanks! I enabled debug but I don't see anything that looks wrong in firebug console. Also noticed that when I am logged out the browser is reloading when I go to another comment-page. The ajaxify-comments message "Reloading page. Please wait..." is also displayed. And this is added to the URL: comment-page-4/?WPACFallback=1&WPACRandom=1398610800521#comments. When I am logged in moving between pages works with Ajax.

    Here is a post with comments where you can check. After the comment author's name there is @ sign which has the clickable link to the parent comment to its right.

    You can log in here with FB or twitter account (top right corner). Then you can leave comment if you need.

  4. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your comment. I see the problem and try to fix it in the next version...

  5. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Please try out the new developer version 0.23.0 from here http://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip. This version includes a bugfix that could solve your problems.

    If it does not help, please leave me a message...

  6. Mr Press
    Member
    Posted 1 year ago #

    Thank you very much! The developer version has fixed so that ajax works when moving between pages when I am logged out. My first issue is still not working though, when the link to the parent comment is clicked, which should just make the page scroll up to the comment. If the comments are on the second page, the same action works fine since at that point "comment-page-2" has already loaded in the url.

    Makes browser reload page:
    Post url: http://testsite.net/2014/04/22/a-new-post/
    Comment url: http://testsite.net/2014/04/22/a-new-post/comment-page-1/#comment-56

    Works:
    Post url: http://testsite.net/2014/04/22/a-new-post/comment-page-2
    Comment url: http://testsite.net/2014/04/22/a-new-post/comment-page-2/#comment-75

  7. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your feedback. Could you please again send me a link, where I can reproduce the problem?

    Best regards,
    Jan

  8. Mr Press
    Member
    Posted 1 year ago #

    Here is a post with comments: link

    The comments are at the bottom of the page and the links "comment-page-1" are in red color. If you go to another comment page at the pagination links at the bottom and then go back to the first comment page and then again click the red links to the parent comment everything will work as it should - by auto scroll to where the parent comment is. The comment form is not visible unless you log in. There is a log in link (modal) at the top right of the page ("logga in").

    Thanks!

  9. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the feedback. I see the problem and need some time to add a workaround in the plugin. This seems to be a WordPress problem that exists by design. You even get the problem, in the default theme when using paged comments: If you are on the first comment page, the page always completely reloads instead of just jumping to the anchor when clicking a comment permalink. The problem is the /comment-page-1/ part in the comment permalink because this path is missing in the browser's URL resp. the WordPress rewrite rules automatically removes it.

  10. Mr Press
    Member
    Posted 1 year ago #

    Thanks again!

    Best regards,
    Chris

  11. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Please try out the developer version from here http://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip. I've added a workaround that "replaces" the unnecessary page loads by a jump (resp. animated scrolling) to the comment (and updating the browser's URL).

    If it does not help, please leave me a message...

  12. Mr Press
    Member
    Posted 1 year ago #

    Excellent! Works the way I want now. Thank you very much!

  13. janjonas
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the feedback and thanks for your donation!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Ajaxify Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.