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

WordPress Trac noreply at wordpress.org
Wed Apr 6 15:46:34 UTC 2016


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

Comment (by azaozz):

 Looking back at this:

 > Option 1:
 > As that's the approach I took for my plugin, I won't say much more than
 I've done so.
 > - Action on unique slug generation (as for new post):
 >  Check for conflict with trash. If so, give trashed post the new unique
 slug (but record its original) and allow use of desired slug by new post.
 > - Action when post is trashed:
 >  Nothing (post keeps its slug going into trash).
 > - Action when trashed post is restored:
 >  Check if original slug is in use. If not, restore original slug. If so,
 keep the unique slug it already has. No new unique slug regeneration
 occurs.

 And then:

 > Option 1 is the winner!

 Not sure if this is the best UX. Example:
 - Write a post about... bananas called "What the...".
 - Publish, popularize it, etc.
 - In a month, trash that post and write a post about politics with the
 same or very similar title.

 As the first post is in the trash, the second will take over the slug, and
 all links pointing to the bananas post will now point to the political
 post. This can pan out really badly depending on context. Of course the
 same can happen when the second post is published few months after the
 first has been deleted.

 IMHO the user should be alerted when reusing old slugs, always. In case
 the old post is still in the trash, that alert can contain a "Delete
 permanently" button.

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


More information about the wp-trac mailing list