[wp-hackers] Wordpress 3.3.1 wp_rewrite bug

Otto otto at ottodestruct.com
Sat Apr 7 19:53:51 UTC 2012

On Fri, Apr 6, 2012 at 1:14 PM, zhaiziming at gmail.com
<zhaiziming at gmail.com> wrote:
> Hey guys,
> I just upgraded my wordpress from 2.9.2 to 3.3.1, and some of the category
> pages are broken. Wordpress treats these pages as posts or attachments
> instead. The problem is that some post "post-name" is the same as category
> "slug".
> In the parse_request() function, it applies all the rewrite rules to the
> request. When it finds a match, it will use get_page_by_path( $matches[
> $varmatch[1] ] ) to check if there is a post exists, and stop the rest of
> the process when the condition is true.
> Is there any suggestion to fix this problem. I don't want to modify
> wordpress code.

Don't use an ambiguous custom permalink structure. Avoid starting your
custom permalinks with non-numerics. Put the %year% in front or


More information about the wp-hackers mailing list