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

WordPress Trac noreply at wordpress.org
Fri Dec 11 16:40:49 UTC 2015


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

 * keywords:  make-flow dev-feedback => make-flow needs-patch


Comment:

 Option 1 is the winner!

 Option 3 is undesirable because of the hard limit on length of
 `post_name`, which is especially limiting for non-ASCII languages where
 slugs are URL encoded. Option 2 is undesirable because it means modifying
 an existing API behavior and opening up potential slug collisions — even
 our own `get_page_by_path()` doesn't check `post_status != 'trash'`.

 The first patch implementation should:

 On unique slug generation (as for new post), check for a slug 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.

 Let's see how that implementation feels, and avoid the untrashing flow for
 the moment. [https://core.trac.wordpress.org/ticket/11863#comment:87
 @helen already stated that flow is an edge case].

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


More information about the wp-trac mailing list