[wp-trac] [WordPress Trac] #5305: permalinks broken when article name is numeric

WordPress Trac noreply at wordpress.org
Wed Oct 31 00:10:31 UTC 2012


#5305: permalinks broken when article name is numeric
--------------------------+-----------------------------
 Reporter:  thomask       |       Owner:  ryan
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:  2.3.1
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------

Comment (by wonderboymusic):

 This is the date rewrite rules being generated regardless of the
 post_permastruct. Because the post permastruct Sergey listed doesn't match
 any form of endian, this date permastruct wins:
 {{{
 if ( empty($date_endian) )
         $date_endian = '%year%/%monthnum%/%day%';
 }}}

 Because of that, day archives are generated which wipe out post
 permastruct when the slug matches a 1-2 digit integer. Here's an
 abbreviated list of the rules that are generated:

 {{{
 array (
   '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$' =>
 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]',
   '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$' =>
 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]',
   '([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$' =>
 'index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]',
   '([0-9]{4})/([0-9]{1,2})/?$' =>
 'index.php?year=$matches[1]&monthnum=$matches[2]',
   '([0-9]{4})/page/?([0-9]{1,})/?$' =>
 'index.php?year=$matches[1]&paged=$matches[2]',
   '([0-9]{4})/?$' => 'index.php?year=$matches[1]',
   '([0-9]{4})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$' =>
 'index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&page=$matches[4]',
 )
 }}}

 Similar issue: #13701

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/5305#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list