wpsharks / comment-mail

A WordPress plugin enabling email subscriptions for comments.
http://comment-mail.com
GNU General Public License v3.0
8 stars 3 forks source link

'Reply to...' link in comment notifications not working #334

Closed bobinoz closed 7 years ago

bobinoz commented 7 years ago

Hi all

Sorry, noticed another bug, not a biggie but worth mentioning. In the comment notifications sent out there are two links to click. The first is 'Continue Reading' and works very well by taking those who click on it directly to that comment on the page.

The other link is 'Reply to...' and then the person who made the comment's name. I assume the intention is to open up a reply box underneath the OP's comment, but it doesn't do that on my setup, it actually goes to the URL at the very top of the page and the /?replytocom=60581#respond appears to be ineffective.

If it helps, I am using nested comments, not sure if this is affecting what happens on my website. I have looked in the admin area to see if I could remove the 'Reply to...' link in these notifications, but I couldn't find a way. That for me would be a solution, but I'd be interested to hear what you think.

Anyway, I thought you would want to know about this issue.

Cheers, Bob

raamdev commented 7 years ago

@bobinoz The ?replytocom is actually a feature of WordPress Core and it's up to the theme you're using to obey that and integrate appropriately so that when that URL is visited, the reply form is placed underneath the appropriate comment.

It's a little tricky to do and requires fully understanding how WordPress handles that, so unfortunately there are many themes that don't support it correctly (or at all). It requires a combination of PHP (to read the ?replytocom query var) and JavaScript (to move the Comment Reply form underneath the appropriate comment when the page is loaded).

You can see an example of how this is done in my personal Independent Publisher theme: https://github.com/raamdev/independent-publisher/blob/1.7/functions.php#L1091-L1113