WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 3 years ago

#32048 new defect (bug)

Uploaded file reserves a name, page can't be named it.

Reported by: programmin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1.1
Component: Permalinks Keywords:
Focuses: Cc:
PR Number:

Description

1) Upload a file-name.png file to media library.
2) Publish a page named "file-name".
3) Note that (if site is set to post-name permalink) the page is now file-name-2
4) Try to rename the attachment and then give the page the natural name, and it still doesn't work.

This might have a similar root cause as bug #13459.

Change History (5)

#1 follow-up: @SergeyBiryukov
5 years ago

  • Component changed from General to Permalinks

Note that (if site is set to post-name permalink) the page is now file-name-2

It's done to avoid a conflict like #15665 or #24612. I don't see an easy solution here, any suggestions?

Try to rename the attachment and then give the page the natural name, and it still doesn't work.

Deleting the attachment and re-uploading it under a different name should work.

#2 in reply to: ↑ 1 @programmin
5 years ago

Replying to SergeyBiryukov:

Deleting the attachment and re-uploading it under a different name should work.

So there is no way to prefer that page to have the first name slug, or disable this rarely used example.com/imagename access to media files?

This ticket was mentioned in Slack in #core by jorbin. View the logs.


4 years ago

#4 @jorbin
4 years ago

I wonder if this is a wontfix. This is the permalink system working as intended. I think having an uploads permalink stolen implies that it is somehow of lesser value than a post.

#5 @programmin
3 years ago

Still happening on 4.7.4

Note: See TracTickets for help on using tickets.