[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 12 23:01:35 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:  normal          |  Milestone:  Awaiting Review
Component:  Query           |    Version:  3.5
 Severity:  normal          |   Keywords:  permalink,draft,post
----------------------------+----------------------------------
 It's possible to force unpublished post content to appear on an existing,
 published post's permalink if an editor or administrator assigns an
 existing slug to one or more unpublished posts via the Quick Edit link on
 All Posts (or the equivalent, for custom post types).

 == Steps to reproduce ==
 1. Start with a default installation of 3.5
 1. Set permalink structure to the 'Post name' Common setting
 1. Save it as a Draft
 1. Give it a title of of 'Unpublished Post' and add body text
 1. Save it as a Draft
 1. View All Posts
 1. Use the Quick Edit link for the Unpublished Post
 1. Assign a slug of 'hello-world' and Update
 1. View the default 'Hello World!' post at /hello-world/

 == Results: ==
 The loop runs and returns both posts in the single.php template.

 You'll get...
 * the full title and text of the unpublished post,
 * a previous link to the default Hello World post,
 * the comments for the Unpublished post, and finally
 * the expected result of the default Hello World post.

 == Real world use case: ==
 A periodical publication with a monthly "From the editor" post. A non-
 technical Editor could (assuming default permissions) potentially notice
 the slug in quick edit and try to "correct" the url, duplicating the first
 post with that title.

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


More information about the wp-trac mailing list