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

WordPress Trac noreply at wordpress.org
Sun Feb 21 21:44:17 UTC 2016


#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 has-patch has-unit-tests   |     Focuses:
  needs-testing                                  |
-------------------------------------------------+-------------------------

Comment (by ericlewis):

 In [changeset:"36607"]:
 {{{
 #!CommitTicketReference repository="" revision="36607"
 Posts: Non-trashed posts should take slug priority over trashed posts.

 When determining a unique post slug, trashed posts are taken into account.
 Previously, new posts would add suffixes to their slugs (e.g. `about-2`)
 when a post in the trash had the desired slug (e.g. `about`).

 To avoid this behavior, when a post is trashed its slug (i.e. `post_name`)
 is now suffixed with `-%trashed%`. The post's pre-trash slug is stored as
 post meta, and if the post is restored from trash, its desired slug is
 reapplied.

 For existing trashed posts which don't have the `-%trashed%` suffix, the
 suffix is added when a post with its desired slug is created.

 Props ocean90, boonebgorges, ryan, SergeyBiryukov, coffee2code, helen,
 williamsba1.
 See #11863.
 }}}

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


More information about the wp-trac mailing list