Opened 2 years ago
Closed 19 months ago
#15970 closed defect (bug) (duplicate)
Hyphen in custom post type breaks admin pagination
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Post Types | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch 3.2-early |
| Cc: | johnbillion@… |
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)
Change History (13)
comment:1
ejdanderson — 2 years ago
- Resolution set to invalid
- Status changed from new to closed
- 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.
comment:4
ejdanderson — 2 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.
comment:6
johnbillion — 2 years ago
- Cc johnbillion@… added
- 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
comment:10
ryan — 19 months 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.

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