[wp-trac] [WordPress Trac] #61824: Pages no longer allowed to have same permalink as images

WordPress Trac noreply at wordpress.org
Wed Aug 14 00:58:34 UTC 2024


#61824: Pages no longer allowed to have same permalink as images
--------------------------+------------------------------
 Reporter:  thommo        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Permalinks    |     Version:  6.6.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by peterwilsoncc):

 It's been the case for a while that attachments and pages can't share the
 same post slug. The reason being that they can share the same URL space.

 If you upload the file sausages.jpg directly to the post library, the
 attachment page will be given the URL example.com/sausages. If you
 subsequently create the page Sausages, it too will have the URL
 example.com/sausages.

 The second page or attachment to be created should have the slug
 `sausages-2`.

 Did you end up in a situation in which the two items both had the same
 slug? I tried reproducing it by uploading an attachment and then creating
 a page of the same name but was unable to.

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


More information about the wp-trac mailing list