[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
Thu Dec 13 17:32:29 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.2
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------------------

Comment (by luke at sametz):

 Was originally spotted on a 3.4.2 site, but tried a clean install of
 current version to test the steps to reproduce. Not sure how far back it
 goes, but guessing at least to 3.0.

 It seems that the permalink structure makes a query based upon the slug -
 the only information available to determine the post to be presented - and
 the loop does its thing and displays all results matching the query, as
 expected. While it's arguably expected behavior, it's certainly unexpected
 results. The real question at the time was whether to report it as a
 permalink issue or a query issue.

 After sleeping on it, I think it might be best if addressed as an
 administrative UI issue. Just ensure that draft posts get unique slugs in
 Quick Edit, just like published ones do. That wouldn't actually resolve
 the root of the issue, just makes sure it can't happen through the
 administrative interface.

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


More information about the wp-trac mailing list