[wp-trac] [WordPress Trac] #25811: Draft posts do not display in control panel posts listing when no category has been checked.

WordPress Trac noreply at wordpress.org
Mon Nov 4 03:59:22 UTC 2013


#25811: Draft posts do not display in control panel posts listing when no category
has been checked.
--------------------------+-----------------------------
 Reporter:  interjinn     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  trunk
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 The issue is specific to the following code found in wp-
 includes/taxonomy.php (line 756 of current trunk):

     $join .= " INNER JOIN $wpdb->term_relationships";

 When no categories are checked then the use of INNER JOIN causes the draft
 to be excluded. This should probably be a left join to ensure such draft
 posts are caught. I don't feel confident enough with WordPress core to
 generate a patch since this could have consequences elsewhere in the
 application, but would like for the issue to be considered. Related to
 such a change would be to change the following (line 760):

     $where[] = "$alias.term_taxonomy_id $operator ($terms)";

 To something like the following:

     $where[] = "$alias.term_taxonomy_id IS NULL OR $alias.term_taxonomy_id
 $operator ($terms)";

 Cheers,
 Rob.

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


More information about the wp-trac mailing list