[wp-trac] Re: [WordPress Trac] #8297: Comment Paging leads to
duplicated URLs for the same content
WordPress Trac
wp-trac at lists.automattic.com
Thu Nov 20 23:58:13 GMT 2008
#8297: Comment Paging leads to duplicated URLs for the same content
-------------------------------------+--------------------------------------
Reporter: wnorris | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: Comments | Version: 2.7
Severity: major | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------------------
Changes (by wnorris):
* keywords: dev-feedback => has-patch needs-testing
Comment:
So it looks like the main problem was simply the trailing slash not
getting applied correctly. The fix was just a couple of lines in wp-
includes/canonical.php (attached).
I've accepted the fact that there isn't an easy way to redirect to the
last comment page when you manually enter a page number that's too high.
At the time of URL canonicalization, we simply don't know how many
comments are going to be displayed on a page, so we don't know how many
page numbers there will be.
The patch file also includes one other small change to wp-includes/link-
template.php... the "Older Comments" and "Newer Comments" links weren't
respecting whether the user wants trailing slashes on their permalinks.
This was causing an additional redirect when returning to the first
comment page, thereby losing the "#comments" fragment on the request.
--
Ticket URL: <http://trac.wordpress.org/ticket/8297#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list