Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#15970 closed defect (bug) (duplicate)

Hyphen in custom post type breaks admin pagination

Reported by: ejdanderson's profile ejdanderson Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Posts, Post Types Keywords: has-patch 3.2-early
Focuses: Cc:

Description

Custom post types with a hyphen (possibly other non-alphabetical/numeric) in their name break pagination on the admin side. I was unable to navigate past the first page and I could not set the screen option to display a custom number of posts per page.

Attachments (3)

15970.diff (2.9 KB) - added by ryan 14 years ago.
15970.2.diff (4.8 KB) - added by SergeyBiryukov 13 years ago.
Refreshed patch
15970.3.diff (4.8 KB) - added by SergeyBiryukov 13 years ago.
With @access private

Download all attachments as: .zip

Change History (13)

#1 @ejdanderson
14 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @ryan
14 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Since sanitize_key() allows hyphens, we should probably handle this.

@ryan
14 years ago

#3 @ryan
14 years ago

  • Milestone changed from Awaiting Review to Future Release

Since this is not a recent regression and there is an easy workaround for plugin authors, let's punt this to 3.2 instead of addressing for 3.1.

#4 @ejdanderson
14 years ago

After a little more testing and initially setting this ticket to invalid, I found that it was not the hyphen breaking the pagination but rather the has_archive argument. See ticket:16013

The hyphen does appear to break the ability to set the show on screen number.

#6 @johnbillion
14 years ago

  • Cc johnbillion@… added

#7 @garyc40
14 years ago

  • Keywords has-patch 3.2-early added; custom post type naming removed

Would like to see this fixed in 3.2, as ryan wants to punt it to 3.2.

Note that this affects not only post types but also taxonomies with hyphens in name.

Closed as duplicate: #16064

#8 @hakre
14 years ago

Patch still applies clean.

@SergeyBiryukov
13 years ago

Refreshed patch

@SergeyBiryukov
13 years ago

With @access private

#9 @ryan
13 years ago

See also #18958

#10 @ryan
13 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Since #18958 has some commits against it, I'll mark this ticket as a dupe.

Note: See TracTickets for help on using tickets.