[wp-trac] [WordPress Trac] #33742: Menu Customizer: Adding draft items?

WordPress Trac noreply at wordpress.org
Fri Sep 9 04:00:37 UTC 2016


#33742: Menu Customizer: Adding draft items?
-------------------------------------------------+-------------------------
 Reporter:  pavelevap                            |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.7
Component:  Menus                                |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion has-unit-      |     Focuses:
  tests                                          |  administration
-------------------------------------------------+-------------------------
Changes (by welcher):

 * keywords:  has-patch needs-unit-tests dev-feedback 2nd-opinion => has-
     patch 2nd-opinion has-unit-tests


Comment:

 I've added a unit test to demonstrate that the current functionality in
 `_wp_ajax_menu_quick_search` is indeed a bug. In
 [attachment:33742-tests.diff] ] there are 4 posts created, 3 of which have
 `post_statuses` that should keep them out of standard queries. In theory,
 only the `publish` post status should be returned however all of them are.

 @westonruter 's [attachment:33742.2.diff] fixes the issue and the test
 passes. You can test by first applying [attachment:33742-tests.diff] and
 then running the Core tests and then applying [attachment:33742.2.diff]
 and re-running.

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


More information about the wp-trac mailing list