Opened 11 years ago
Closed 11 years ago
#12597 closed defect (bug) (fixed)
404 when viewing an attachment or paginated custom post type
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | needs-testing |
Focuses: | Cc: |
Description
Has anyone gotten attachments and pagination to work for custom post types? This doesn't seem to be working for me, and I think it's something we may have overlooked.
Let's suppose I have a post type called movies. The permalink structure looks like this for a single movie:
localhost/movies/good-will-hunting
Now, let's say this is a long article and I want to split it into multiple pages. I'd use the <!--nextpage-->
tag for this in the post editor. This gives me a page 2 to click on:
localhost/movies/good-will-hunting/2
I'm getting a 404 here.
Now, let's suppose I want to use the [gallery]
shortcode to display some images. When clicking on an image, the URL is:
localhost/movies/good-will-hunting/robin-williams
This also results in a 404.
I'd venture to say that <!--nextpage-->
isn't used too often, but image attachments are pretty important.
Currently generated Rewrite rules for custom post_types:
Lacks ALL endpoints (Aside from ugly paging and feeds).
Rules generated afterwards:
Seems to cover all the bases mentioned here along with everything else thats not.
Leaving open seeking testing feedback.
Note to developers: You'll need to flush your rewrite rules after this changeset to see any improvement.