[wp-trac] Re: [WordPress Trac] #9069: Function get_comment_link
returns duplicate URLs for comments available at permalink
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 10 00:01:26 GMT 2009
#9069: Function get_comment_link returns duplicate URLs for comments available at
permalink
---------------------------+------------------------------------------------
Reporter: GregMulhauser | Owner: Viper007Bond
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Comments | Version: 2.7.1
Severity: normal | Keywords:
---------------------------+------------------------------------------------
Changes (by Viper007Bond):
* type: defect (bug) => enhancement
* milestone: 2.7.2 => Future Release
Comment:
Only bug fixes and security issues go into the 2.7 branch for the most
part. Things such as this go into trunk (2.8 currently) and then if deemed
necessary get back ported into the current branch (2.7 currently). When it
gets committed, or is at least getting close with a working patch file,
then it gets a proper milestone.
Anyway, nothing wrong with `get_page_of_comment()` -- it's doing the job
it was designed to do and should always return an integer if paging is
enabled. `get_comment_link()` is the one, that in your scenario, should be
deciding what to do with that value. However as I said, I think it's best
if the page number is always in the URL for comment permalinks. Having a
bit of stuff in the head telling Google to ignore that URL would be a good
addition though BTW.
And incase you didn't realize, what page a comment is on will never change
unless: a) the comments-per-page is changed, or b) a comment is deleted.
Oldest comments are '''always''' on page 1 and newest are on the latest
page, regardless of settings. The settings just control which page gets
shown first (number 1 or the last) and which comments show up at the top
and bottom of each page.
So that means if a user switches from oldest comments being displayed by
default to newest comments being displayed by default, all comments will
remain on the page that they were on before. However a different page
number will be displayed by default, that's all.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9069#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list