Support » Fixing WordPress » Child Page with Numeric Permalink Broken in 2.5

  • Resolved rocketsauce


    I have a number of child pages with totally numeric permalinks that were working prior to my 2.5 upgrade:


    parent page permalink: stuff

    which has a child page with permalink: 2222 (which would be /stuff/2222/)

    Since 2.5, /stuff/2222/ now resolves to (generates the content of) the parent page /stuff/. A child page with a permalink consisting of letters (i.e. /stuff/blah/) does work correctly.

    I’m assuming this has something to so with url rewriting/resolution… is there any solution to this other than changing all my numeric permalinks?

    In addition and curiously, I remember numeric tags behaving somewhat similarly to this (but I never looked any further into the problem); however since upgrading my numeric tags work now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve tracked it down to changes in rewrite.php and it may have something to do with $use_verbose_page_rules and one of the new functions.

    (I downgraded rewrite.php and the old behavior is back without any other ill effects. Also numeric tags have now gone back to the old behavior and stopped working… i.e. /tag/2001/ generates the page I have set with permalink “tag”)

    Is anyone more familiar with rewrite.php and able to comment on this?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    The rewriting has always had a bit of a problem with numeric post slugs. It’s not an expected behavior, generally speaking post slugs should not be all numeric. It expects numeric values in the URL for other cases, like dates and pages and such, and numeric slugs can mess it up from time to time.

    I’d suggest rethinking your plan there and avoiding the use of numeric slugs.

    Thanks, I think that would be wise.

    The rewriting has always had a bit of a problem with numeric post slugs.

    My experience is that I’ve had a numeral-only slug for an important child page on my site running WordPress since 2003 (can’t recall the version back then). It’s been fine until WP 2.5, which has broken it.

    I think it would be wiser for WP to not break people’s permalinks and trash their PageRank rather than users having to “rethink” each time someone goofs in WP programming. Apologies for a slightly sharp tone, but this’d be fair enough if their was some good long-term-planning rationale for the sudden change – it just looks like something’s broken and it’s easier to get people to work around it than actually fix it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Child Page with Numeric Permalink Broken in 2.5’ is closed to new replies.