[wp-trac] [WordPress Trac] #60569: Generate UUID for media slugs if attachment pages are inactive.
WordPress Trac
noreply at wordpress.org
Sun May 19 22:57:43 UTC 2024
#60569: Generate UUID for media slugs if attachment pages are inactive.
--------------------------------------+-----------------------
Reporter: peterwilsoncc | Owner: antpb
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.6
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses:
--------------------------------------+-----------------------
Comment (by peterwilsoncc):
Replying to [comment:4 oglekler]:
> And what will happen if attachment pages were disabled and then this
condition is changed?
The attachment pages would work but the URL would use the name assigned at
image attachment, for example `/my-page/11223344-5566-7788-99AA-
BBCCDDEEFF00`. While it's not impossible that it will happen, as the pages
need to be re-enabled via a plugin or a WP-CLI command It's safe enough to
consider this an edge case.
As an implementation detail, it's possible that WP could use the
`pre_wp_unique_post_slug` hook to allow plugins to remove the feature
without enabling attachment pages.
> Personally, I had a lot of troubles with images and page names because I
am always naming images describing what is there, like: white-t-shirt.png
or our-team.jpg and ended up just adding "-image" to the end of all images
I am uploading.
This is what I'm hoping to avoid the need for. There's few things worse
than having a page show as `/our-team-2` because the photo on the page is
called `our-team.jpg` and claimed the slug `our-team` as a result.
Do you have a preferred approach to the very ugly URLs to handle the edge
case when attachment pages are inactive? I'm happy to consider
alternatives and rename the ticket accordingly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60569#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list