Strange pagination behaviour
-
First of all, thank you for your plugin. Its working great except for one issue. When I click on the link for older comments, the page just scrolls back up to the first comment on the page but the same comments are still display. The url changes and adds /comment-page-1/#comments.
I have deactivated all my plugins, deactivated my genesis/dynamik theme and activated the twenty-fourteen theme. When I deactivate your plugin, the default wordpress pagination works fine.
Thanks for your help,
Adrian
-
Could you please send me a link where I can reproduce the problems?
I’m sorry but I can’t provide you a link because i’m currently only working on a local developement site.
Ok. Could you please enable the debug mode and copy and paste the debug output into this post. Maybe this helps to find the problem.
Hi Janjonas,
Here is the information from the console when I first load the page that I have comments on:
An unbalanced tree was written using document.write() causing data from the network to be reparsed. For more information https://developer.mozilla.org/en/Optimizing_Your_Pages_for_Speculative_Parsing 1-at-the-table:3204
“[WP-Ajaxify-Comments] Initializing version 0.25.0” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery 1.11.1” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery blockUI 2.6” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery Idle Timer plugin” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Attach form…” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment form (selector: ‘#commentform’)… Found: ” Object { 0: <form#commentform.comment-form>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#commentform” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comments container (selector: ‘#comments’)… Found: ” Object { 0: <div#comments.entry-comments>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#comments” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search respond container (selector: ‘#respond’)… Found: ” Object { 0: <div#respond.comment-respond>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#respond” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment paging links (selector: ‘#pagination a’)… Not found” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment links (selector: ‘#comments a[href*=”/comment-page-“]’)… Found: ” Object { 0: <a.comment-time-link>, 1: <a.comment-time-link>, 2: , length: 3, prevObject: Object, context: HTMLDocument → 1-at-the-table, selector: “#comments a[href*=”/comment-page-“]” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Initialization completed”When I click on the “Older Comments” button, the following appears in the console:
“[WP-Ajaxify-Comments] Scroll to anchor element ” Object { 0: <div#comments.entry-comments>, length: 1, context: HTMLDocument → comment-page-1, selector: “#comments” } ” (scroll speed: 500 ms)…”
I hope this helps,
Adrian
Could you please check network console of your browser which URL is loaded after clicking the “Older Comments” button.
Than please copy and paste this URL into a new browser tab an make sure that the page that is loaded really shows the “older” comments.Hope this helps…
Hi Janjonas,
When I click on the “Older Comments” button, the following appears at the bottom of the network logger in the console:
“[WP-Ajaxify-Comments] Scroll to anchor element ” Object { 0: <div#comments.entry-comments>, length: 1, context: HTMLDocument → comment-page-1, selector: “#comments” } ” (scroll speed: 500 ms)…”
Not sure where the URL is in the line. When the page is loaded for the first time, the follow also appears in the network logger:
“[WP-Ajaxify-Comments] Initializing version 0.25.0” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery 1.11.1” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery blockUI 2.6” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Found jQuery Idle Timer plugin” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Attach form…” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment form (selector: ‘#commentform’)… Found: ” Object { 0: <form#commentform.comment-form>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#commentform” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comments container (selector: ‘#comments’)… Found: ” Object { 0: <div#comments.entry-comments>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#comments” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search respond container (selector: ‘#respond’)… Found: ” Object { 0: <div#respond.comment-respond>, length: 1, context: HTMLDocument → 1-at-the-table, selector: “#respond” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment paging links (selector: ‘#pagination a’)… Not found” wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Search comment links (selector: ‘#comments a[href*=”/comment-page-“]’)… Found: ” Object { 0: <a.comment-time-link>, 1: <a.comment-time-link>, 2: , length: 3, prevObject: Object, context: HTMLDocument → 1-at-the-table, selector: “#comments a[href*=”/comment-page-“]” } wp-ajaxify-comments.js:87
“[WP-Ajaxify-Comments] Initialization completed”Adrian
Ok I did some testing and have some more information. I created a fresh site and got it all working. However when I activate the genesis framework, it stops working and I notice this line in the network logger appears when genesis is activated:
“[WP-Ajaxify-Comments] Search comment paging links (selector: ‘#pagination a’)… Not found”
Without the genesis framework, the same line above looks like this:
“[WP-Ajaxify-Comments] Search comment paging links (selector: ‘#comments [class^=’nav-‘] a’)… Found: ” Object { 0: , 1: , length: 2, prevObject: Object, context: HTMLDocument → test, selector: “#comments [class^=’nav-‘] a” }
So there is obviously an issue with the genesis framework. Is that something that can be fixed?
Now with my development site, there must be more issues, because when I first noticed the problem, I deactivated Genesis and all plugins and it did not fix the issue. I’ve just tried again and it still does not work. It still has the Search comment paging links error. However, if I can get it to work with genesis on a fresh site, I can then start looking into what else might be causing the issue.
Adrian
The genesis framework seems to be a professional (not free) extension so I’m not able to reproduce the problem.
The error message “[WP-Ajaxify-Comments] Search comment paging links (selector: ‘#pagination a’)… Not found” means, that you need to customize the “Comment paging links selector” option to a selector that matches the (comment) paging links. The genesis framework seems to use other CSS classes than the default WordPress themes.
If you can provide me a copy of your source code of your site I will take a closer look into the problem. You can send me a private message here https://blog.janjonas.net/contact.
Best regards,
JanThanks for all your help. After reading what you said, and then doing a search on “Comment paging links selector” I came across an answer you gave a year ago at:
After analysing the problem there, and how it was fixed, I managed to get my problem fixed.
For all those using the Genesis framework, you need to change the “Comment paging links selector” to “#comments a” It’s that simple.
Thanks again for your help, and for a great plugin. I’ll be leaving a good review,
AdrianThanks for your feedback and the review ??
- The topic ‘Strange pagination behaviour’ is closed to new replies.