[wp-trac] [WordPress Trac] #22902: Duplicate post slug causes unpublished posts to display in single post template, based on permalinks

WordPress Trac noreply at wordpress.org
Wed Dec 19 05:58:27 UTC 2012


#22902: Duplicate post slug causes unpublished posts to display in single post
template, based on permalinks
-----------------------------+------------------
 Reporter:  luke at sametz   |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  high             |   Milestone:  3.6
Component:  Quick/Bulk Edit  |     Version:  3.2
 Severity:  major            |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch


Comment:

 `wp_unique_post_slug()` bails early when dealing with a draft: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/post.php#L3073

 `get_sample_permalink()` contains a hack to prevent that by faking a
 `'publish'` status: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5/wp-
 admin/includes/post.php#L994

 [attachment:22902.patch] is an attempt to fix the issue by implementing a
 similar hack in `wp_ajax_inline_save()`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22902#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list