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

WordPress Trac noreply at wordpress.org
Thu Dec 10 01:35:09 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 dev-feedback  |     Focuses:
------------------------------------+------------------------

Comment (by coffee2code):

 Replying to [comment:93 SergeyBiryukov]:
 > I'm leaning to option 2 or 3, because they both seem to account for the
 following scenario:
 >
 > 1. Create a post and trash it.
 > 2. Create a second post with the same slug and trash it too.
 > 3. Restore the first post, it should have the original slug.

 Just so it doesn't get mischaracterized, option 1 does the same. I have
 unit tests for the plugin that account for various trash and restore
 scenarios (including the one you've specified and more complex
 variations). I [comment:90 referenced] an overview upthread that explains
 what it does.

 ''(The plugin hooks `wp_unique_post_slug()` and not `wp_insert_post()` as
 [comment:91 summarized].)''

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


More information about the wp-trac mailing list