Opened 12 years ago
Closed 11 years ago
#26133 closed defect (bug) (fixed)
Comment permalinks in notification emails should include pagination
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
[This is my first time submitting a trac ticket - I apologize if I'm not doing it correctly. I searched the support forms (and posted a week ago but got no response), and have searched the trac for existing tickets, but didn't turn up anything that matched. Thanks!]
In Settings->Discussion, we have "Break Comments into pages with 25 top level comments per page and the last page displayed by default. We also have comments should be displayed with the older comments at the top of each page.
When a comment is first left by the reader, there may already be several pages of comments. The comment initially will appear on the default page (because we have the last page displayed by default), so the pagination is not necessary in the permalink:
http://oursite.com/blog-post/#comment-12345
However, by the time our moderator clicks the link, there have usually been several more pages of comments - so the anchor #comment-12345 doesn't do any good (because the original comment is no longer on the most recent page). She then has to page through the comments manually to find the comment, which is time-consuming and frustrating.
It would be far preferable for the permalink in the email notification to include the fully paginated link:
http://oursite.com/blog-post/comment-page-5/#comment-12345
Attachments (1)
Change History (8)
#3
@
12 years ago
I previously tried to find more info on the get_comment_link()
function in the codex, but it didn't indicate if it includes the pagination in the link by default. If so, maybe it really is as simple a change as using that instead of get_permalink()
in the emails?
You make a good point about pagination changes from commend moderation - though for us that's a lesser concern because it happens less often. However, perhaps a solution is to have a permalink+redirection system in place? There could be a standardized comment permalink URL generated, which then redirects to the current comment location.
Something like...
http://oursite.com/comments/comment-12345
...which would then cause a database lookup to figure out where to redirect to, and then issues a 301 redirect to the current location of the comment:
http://oursite.com/blog-post/comment-page-5/#comment-12345
Thanks for the ticket submission, @eatingrules. No worries on process, you did great with the description. I'm not able to find a duplicate ticket either and this does sound like an interesting issue.
For reference, direct links to the comments were added through #12797 in 3.1.
At first glance, there may be a way for us to use
get_comment_link()
when generating the notification rather than the currentget_permalink()
.I do wonder how we would handle comments that change pages as moderation occurs. Links in the email may still be incorrect at some point.