[wp-trac] [WordPress Trac] #18962: Allow duplicate slugs for different content

WordPress Trac noreply at wordpress.org
Mon Nov 17 03:49:03 UTC 2014


#18962: Allow duplicate slugs for different content
---------------------------------------------+-----------------------------
 Reporter:  maorb                            |       Owner:  wonderboymusic
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  4.1
Component:  Permalinks                       |     Version:  2.9
 Severity:  major                            |  Resolution:
 Keywords:  has-patch commit has-unit-tests  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by dd32):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 @wonderboymusic - How does this change handle attachments?

 Attachments need to be unique across all post types (I'm not entirely sure
 why, but that's what the code says), take this scenario:
 1. Create a page /test/
 2. Upload a file which ends up at /test/example/
 3. Create a page /test/example/

 Previously creating the page would be blocked and created as
 /test/example-2, but it looks like this now allows that, and as a result
 the post_type check should be changed to `post_type IN( $post_type,
 'attachment')`?

 Re-opening pending that and #30339

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


More information about the wp-trac mailing list