﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21209,Pagination on bare category slugs returns 404 errors,nkinkade,nacin,"Since upgrading to 3.4 or 3.4.1 (not sure which), I discovered that pagination is broken, returning 404 errors, on URLs which utilize bare category slugs.

Steps to reproduce:

* Install a fresh copy of 3.4.1
* Set a custom permalink structure to anything that begins with /%category%/, for the sake of example: /%category%/%postname%/
* Create a regular category with any name/slug you like.  For the purposes of this sample, the slug will be '''mycat'''
* Create a number of sample posts which exceeds the value of Settings->Reading->Blog pages show at most # posts, adding each of them to the category created in the step above, thereby creating a paging situation.
* Access the URL: http://mysite/mycat, which should render the most recent posts, with a link to ""Older posts"" at the bottom.
* Click on ""Older posts"", and the resulting page should yield a 404 error, the page address being http://mysite/mycat/page/2.

This issue is very similar to the very old ticket [http://core.trac.wordpress.org/ticket/5331 #5331].

Ostensibly, the reason why a 404 is returned is because no rewrite rules are generated to catch such permalinks, and a review of the rewrite rules, via some plugin or simply printing $wp_rewrite->rules(), reveals this to be true.

Whether bare category slugs without a category base are even technically allowed is another issue. But even so, because this undocumented/illegal ""functionality"" has been around for years and years, this feels like a regression to anyone who may have inadvertently come to rely on it.

At a bare minimum WP should not be generating links which produce 404s, and it would be very nice, and consistent with past behavior of the code, if URLs of the form http://mysite/mycat/page/2 were supported.  ",defect (bug),closed,normal,3.4.2,Permalinks,3.4.1,normal,fixed,has-patch,nkinkade
