WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#50175 new defect (bug)

WordPress Image name and Page name permalink

Reported by: brandyf Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: close
Focuses: Cc:

Description

After uploading an image called "packages.jpg" I created a page called "Packages". I didn't notice at first but it saved the permalink for that page as "/packages-2". Later, when I created a link to the "/packages" page, clicking on the link displayed the image "packages.jpg" instead. I tried re-naming the permalink for the Packages page from "packages-2" to "packages" and it wouldn't save so I ended up changing the page permalink to "package" instead. I was using relative links to the Packages page in the page content, not absolute links. <a href="packages"></a>

Change History (1)

#1 @SergeyBiryukov
7 months ago

  • Component changed from General to Permalinks
  • Keywords close added

Hi there, welcome to WordPress Trac! Thanks for the report.

The -2 suffix is added to the page slug to avoid a conflict with the attachment name in some permalink structures. This was done in [30629] / #18962.

It looks like this is working as intended, I don't see a bug here. If you'd to free up the packages slug, just delete the attachment or upload it under a different name.

There are, however, some related issues: #12634, #13459, #15665, #24612, #34972.

Version 0, edited 7 months ago by SergeyBiryukov (next)
Note: See TracTickets for help on using tickets.