- This topic has 22 replies, 4 voices, and was last updated 3 years, 10 months ago by
David.
-
AuthorPosts
-
July 30, 2021 at 9:21 am #1877483
Jesse
Hello,
The reply button that appears under the comment is not working. It just links to the comment instead of opening the form that allows you to type your reply. How can I fix this?
Best regards,
JesseJuly 30, 2021 at 11:11 am #1877576Leo
StaffCustomer SupportHi Jesse,
Comments are handled by WordPress itself so I don’t believe this is a theme issue.
Have you tried disabling all custom functions and plugins except GP Premium to eliminate any conflicts from elsewhere?
Let me know 🙂
August 19, 2021 at 2:50 pm #1901847Nick
Hi Leo,
I’m having the same issue as Jesse. Here’s what my tech support has done to troubleshoot so far:
We isolated the issue by deactivating plugins and even switching to a different theme and found that the problem was your theme. The reply link is completely dead and there isn’t a plugin conflict. And the lack of console errors helps us confirm this. Thus, this is something that will need to be raised with the theme author. Typically, for issues of similar scope, the issues don’t persist long because the author is aware and they plan to release a fix. But whether they are aware or not is something that should be checked.
I do believe it is the theme because when I use a different theme, the function works. Nonetheless, we did find the code that might be responsible for this and I attempted to fix it by adding a piece of code within the child theme’s functions.php file
// Enqueue Comment Reply function sidehustle_enqueue_comment_reply_script() { if ( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment_reply' ); } } add_action( 'comment_form_before', 'sidehustle_enqueue_comment_reply_script' );
I am able to reply from the admin panel, but not from the front-end of the site. The reply link just links to the comment, but doesn’t open the reply form as expected. Here’s an example page with comments. Do you verify the same behavior?
Is there a way to make those reply links function as intended?
Thanks for your help!
August 19, 2021 at 3:31 pm #1901862Jesse
Hi Leo,
To add to Nick’s message above, I am still having this issue as well.
Best regards,
JesseAugust 19, 2021 at 4:23 pm #1901887Leo
StaffCustomer SupportHi Nick and Jesse,
Can both of you disable all plugins including GP Premium and activate the parent theme (if you are using a child theme) to test?
This is unlikely a theme issue – GP simply inserts the comment functionality from the core WordPress.
August 22, 2021 at 5:57 pm #1904797Jesse
Hi Leo and Nick,
I narrowed it down to the Yoast SEO plugin.
The reply function works normally when I deactivate Yoast. It stops working again when I re-activate Yoast.
Best regards,
JesseAugust 22, 2021 at 9:36 pm #1904890Leo
StaffCustomer SupportI wonder if there is a certain setting in Yoast that needs to be changed – worth checking with their support team.
We are using Yoast for our site as well and haven’t encountered this issue. For example:
https://generatepress.com/generatepress-3-0-4/I can’t recall other mentions of this either and you are definitely not the only user with GP + Yoast 🙂
September 28, 2021 at 10:31 am #1945954Nick
FWIW, I added this line to functions.php and it seemed to resolve the problem of not being able to reply to comments:
add_filter( ‘wpseo_remove_reply_to_com’, ‘__return_false’ );
September 28, 2021 at 10:32 am #1945955Leo
StaffCustomer SupportThanks for sharing!
September 28, 2021 at 12:18 pm #1946049Jesse
Hi,
What does this filter do exactly? I understand it fixed the issue for Nick, but curious as to how?
Best regards,
JesseSeptember 28, 2021 at 12:21 pm #1946050Leo
StaffCustomer SupportYou might want to check with Yoast’s support team for this as that’s a filter from them 🙂
October 6, 2021 at 7:01 pm #1955374Jesse
Hi Leo,
Here is what Yoast had to say:
Thanks for contacting Yoast Support.
The removal of the replytocom variables is actually one of the Yoast SEO plugin’s hidden features.
In short, it prevents your site from creating lots of URLs with no added value. WordPress has a replytocom feature that lets you reply to comments without activating JavaScript in your browser. But this means that for every comment, it creates a separate URL with ?replytocom variables. The disadvantage of this is that if you get a lot of comments search engines have to index all those URLs, which is a waste of your crawl budget. Therefore we remove these variables by default.
Using the filter that you mentioned will disable the removal of the replytocom variables, and will generate a unique and separate URL for each of those comments. It might not necessarily hurt your SEO, but it’s something to consider regarding your crawl budget.
Please let us know if you have any other questions or concerns.
That makes sense, but I still don’t understand why it only became an issue recently. The “reply” button was always working before.
I’m looking at so many other sites that I’m familiar with and I know they use Yoast. When I hover my mouse over the reply button on their comments, the URL is:
https://domain.com/post-name-here/#comment-12345
…and that was the same URL structure of my own “reply” button before I turned on the filter posted above. Now the URL for my reply button looks like this:
https://domain.com/post-name-here/?replytocom=12345#respond
Any ideas?
Best regards,
JesseOctober 7, 2021 at 2:58 am #1955625David
StaffCustomer SupportHi there,
we use Yoast on this site – you can see here the adapted HREFs for the comments reply link that Yoast adds:
https://generatepress.com/introducing-the-gp-theme-builder/
And the reply button is working.
Sounds to me like a Javascript issue, which could be another script that is blocking the yoast script.
If you want to remove the filter function i can take a closer look to see what else is going on your site.October 7, 2021 at 3:40 am #1955655Jesse
Hi David,
I have disabled the Yoast filter. That would be wonderful if you could take a closer look at my site!
Best regards,
JesseOctober 7, 2021 at 4:56 am #1955709David
StaffCustomer SupportI took a look to see what Event Listeners were firing when you click the reply links. Aside from the GP
menu.js
i see two other plugins firing scripts.The first and least active ( less likely to be a problem ) is the Social Pug plugin.
The second and most active, it has several event listeners, is the WP Recipe Maker plugin.So it might be either ( more likely the latter ) plugin that is conflicting with what Yoast is doing.
But i also notice the Javscripts are being served from a CDN, there is a possibility that an older cached script is being loaded by the CDN, so purging that may be the first place to check.
-
AuthorPosts
- You must be logged in to reply to this topic.