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

WordPress Trac noreply at wordpress.org
Mon Feb 23 01:08:47 UTC 2015


#5305: permalinks broken when article name is numeric
-------------------------------------+---------------------------
 Reporter:  thomask                  |       Owner:  valendesigns
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.2
Component:  Permalinks               |     Version:  2.3.1
 Severity:  major                    |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------

Comment (by valendesigns):

 @boonebgorges This looks great! Nice catch on the page `1` bug, as well. I
 think the only thing left to do is have more people test it out. So I'll
 summarize the patch for those interested in testing.

 * Added a total of twelve new test. Two of those tests should pass and ten
 should fail before the patch is applied. Those tests are:
 {{{
 test_date_slug_collision_should_distinguish_too_high_pagination_from_date()
 }}}
 {{{
 test_date_slug_collision_should_be_ignored_when_pagination_var_is_present_but_post_does_not_have_multiple_pages()
 }}}

 * Resolved the following date premalink structures for numeric slugs;
 ''this includes posts without titles''.
     * `/post_name/`
     * `/post_name/page/`
     * `/year/post_name/`
     * `/year/post_name/page/`
     * `/year/month/post_name/`

 * Accounted for `day` and `monthnum` values that are cast to integers,
 which strips leading zeroes.  This allows us to resolve variations in
 `post_name`, like `/2015/2/` and `/2015/02/`.

 * Added the `page` query var when post pagination is present and valid.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/5305#comment:69>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list