WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#12363 new defect (bug)

Comment permalink wrong when only listing one comment type

Reported by: Viper007Bond Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Comments Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

If you pass the type parameter to wp_list_comments() (for example, to show comments only and no pings), then comment permalinks can easily use the wrong page number as they expect there to be pings included. This is apparent after leaving a comment and WordPress attempts to redirect back to your new comment.

At first I was thinking you could tell WordPress that you're filtering to a type and it could compensate when determining the page number, but then I realized perhaps it'd just be better for wp_list_comments() to check if there were 0 comments returned for the query and if so, see if there are any of that type of comment available. If so, then we know we're on too high of a page number and can instead display the highest existing page. Then again this introduces SEO issues.

Ideas on what to do are welcome.

Change History (3)

comment:1 hakre4 years ago

  • Keywords dev-feedback added

comment:2 nacin3 years ago

  • Milestone changed from Awaiting Triage to Future Release

comment:3 nacin3 years ago

At first I was thinking you could tell WordPress that you're filtering to a type and it could compensate when determining the page number,

That does make sense.

Note: See TracTickets for help on using tickets.