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

WordPress Trac noreply at wordpress.org
Fri May 29 12:52:19 UTC 2015


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

Comment (by boonebgorges):

 In [changeset:"32647"]:
 {{{
 #!CommitTicketReference repository="" revision="32647"
 Disallow post slugs that will result in permalinks that conflict with date
 archive URLs.

 On certain permalink structures, a numeric post slug will result in a post
 permalink that conflicts with a date archive URL. For example, with
 permastruct
 `/%year%/%monthnum%/%postname%/`, a post published in May 2015 with slug
 `'15'` will result in a URL (`/2015/05/15/`) that conflicts with the
 archive
 for May 15, 2015.

 To avoid this problem, `wp_unique_post_slug()` rejects a requested slug
 when it
 would generate a conflict of this type. Thus, in our example, `'15'` would
 become `'15-2'`.

 Props valendesigns, boonebgorges, Denis-de-Bernardy, loushou.
 See #5305.
 }}}

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


More information about the wp-trac mailing list