Make WordPress Core

Opened 4 years ago

Closed 13 months ago

#50175 closed defect (bug) (invalid)

WordPress Image name and Page name permalink

Reported by: brandyf's profile brandyf Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: close
Focuses: Cc:


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 (2)

#1 @SergeyBiryukov
4 years 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 like 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.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

#2 @JeffPaul
13 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.