Opened 9 years ago
Last modified 6 years ago
#35482 new defect (bug)
Archival pagination fails in 4.4 and up
Reported by: | Ipstenu | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Rewrite Rules | Keywords: | needs-unit-tests |
Focuses: | Cc: |
Description
Stemming from research into a weird 'category' issue in #35344
- Make your permalinks
/%category%/%postname%/
or anything _as long as_ you start with/%category%/
- Go to
example.com/category/SOMECAT/
and everything works.
- Go to
example.com/SOMECAT/
and WP thinks it’s an _archive_! And pagination fails. Either it's a 404, or it redirect you to the 'most appropriate' page (I ended up on http://local.wordpress-trunk.dev/page-a/2/ a lot)
I tested this with /%author%/%postname%/
and /bob/%postname%/
- the former had the same issue, the latter shows a 404 for http://local.wordpress-trunk.dev/bob/
and this is expected!
If the permalink 'base' is any of our structure tags ( https://codex.wordpress.org/Using_Permalinks#Structure_Tags ) then WordPress is attempting to generate an archival page for something it knows, and the pagination is failing. Logically this is becuase any ‘base’ page that _can_ generate an archive of itself (cats, tags, dates, but _not_ bob
) should be doing so.
Contrary to initial reports, this is a 4.4+ bug, it was _not_ introduced by 4.4.1
Slugs like bob and 'archive' (the slug you get if you pick the 'Numeric' permalink option) have never, that I can see, paginated.
Digging even deeper....
- Permalinks set to
/%year%/%category%/%postname%/
- Visit
example.com/2016/SOMECAT
and the page displays an archive
- Pagination from here does _not_ work (tested on 4.4 and 4.3 so I think its okay to assume that never worked....)
I'm not sure if these should have worked. I know that if you do /%year%/%month%/%postname%/
then the year and the year/month archive URLs will work, but that may be a separate issue.
Change History (6)
#3
@
9 years ago
Odd, I could verify it in 4.x as well, I just didn't try anything older. I don't think this is a regression, just something that has always "worked" and never been properly handled.
#4
@
9 years ago
- Severity changed from normal to major
Does anyone know whether this will be fixed quickly, as none of the pages on our site paginate (Blog, News, Events, etc)?
Is this something we'd need a Developer to try to fix, or is this a genuine bug affecting all WordPress sites?
Thanks
#5
@
9 years ago
- Severity changed from major to normal
@BrianLF - I think you're having https://core.trac.wordpress.org/ticket/35344 and not this issue. This is limited ONLY to archival pages when author or category is the 'base'.
I'm able to verify the bug under 3.8 - with
/%category%/%postname%/
and hitting/uncategorized/
I'm given a category listing whose pagination links to/uncategorized/page/2/
which 404's.