[wp-trac] [WordPress Trac] #35482: Archival pagination fails in 4.4 and up

WordPress Trac noreply at wordpress.org
Fri Jan 15 20:59:39 UTC 2016


#35482: Archival pagination fails in 4.4 and up
---------------------------+-----------------------------
 Reporter:  Ipstenu        |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:  4.4
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 Stemming from research into a weird 'category' issue in #35344

 1. Make your permalinks {{{/%category%/%postname%/}}} or anything _as long
 as_ you start with `/%category%/`

 2. Go to `example.com/category/SOMECAT/` and everything works.

 3. 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....

 1. Permalinks set to `/%year%/%category%/%postname%/`

 2. Visit `example.com/2016/SOMECAT` and the page displays an archive

 3. 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35482>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list