Opened 11 years ago
Last modified 7 years ago
#35482 new defect (bug)
Archival pagination fails in 4.4 and up
| Reported by: | Ipstenu | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Rewrite Rules | Version: | |
| Severity: | normal | Keywords: | needs-unit-tests |
| Cc: | Focuses: |
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/SOMECATand 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
@
11 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
@
11 years ago
- Severity normal → 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
@
11 years ago
- Severity major → 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'.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.