[wp-trac] [WordPress Trac] #11863: Trashed items interfere with page/post slug generation

WordPress Trac noreply at wordpress.org
Fri Aug 19 09:15:39 UTC 2016


#11863: Trashed items interfere with page/post slug generation
-------------------------------+------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ericlewis
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:  4.5
Component:  Posts, Post Types  |     Version:  2.9
 Severity:  normal             |  Resolution:  fixed
 Keywords:                     |     Focuses:
-------------------------------+------------------------

Comment (by jadpm):

 I know this tikets is closed, fixed and shipped with WodPress 4.5 already.
 Just wanted to voice here, too late, that changing the slug of a post when
 it gets trashed might not have been the best idea when thinking on broader
 usages.

 Consider a private post type used for non-standard purposes, like shop
 orders or content blocks. Those items might be referenced somewhere by ID,
 or by slug, storing the reference, say, on a postmeta, in the idea that
 slugs are, like IDs, unique (as the existence of functions like
 `wp_unique_post_slug` suggest...). When you have to query for references
 containing the item slug, if the item has been trashed, all references get
 broken as they do not include the new `__trashed` suffix.

 Also, I do not get how we jumped from comment 100:
 https://core.trac.wordpress.org/ticket/11863#comment:100
 >Option 1 is the winner!
 which states
 >Action when post is trashed: Nothing (post keeps its slug going into
 trash).
 to comment 102: https://core.trac.wordpress.org/ticket/11863#comment:102
 which directly starts implementing the changes to sligs for trahed items.
 I assume discussion happened somewhere else, but it woudl be nice to knwo
 why and how the decision was made?

 I am not discussing whether there was a usability issue to fix, which is
 obvious. But thinking about usages out of the box might have prevented
 breaking such references, that do happen in the wild, believe me :-)

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


More information about the wp-trac mailing list