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

WordPress Trac noreply at wordpress.org
Fri Jan 23 12:01:35 UTC 2015


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

Comment (by jesin):

 How about padding the slug with a leading zero?

 I found another bug, not sure if there is a ticket for it.

 1. Set the permalink structure to `%postname%`.
 2. Create a **post** with slug `foo-bar`.
 3. Create a **page** with the same slug `foo-bar`.

 Now the URL **example.com/foo-bar/** loads the **page** created in step 2.

 Problem lies in `wp_unique_post_slug()` which checks for uniqueness only
 within the post type.

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


More information about the wp-trac mailing list