[wp-trac] [WordPress Trac] #33404: Customizer Menus: Search results can have duplicate items

WordPress Trac noreply at wordpress.org
Tue Aug 18 15:24:14 UTC 2015


#33404: Customizer Menus: Search results can have duplicate items
----------------------------+-----------------------------
 Reporter:  valendesigns    |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Customize       |    Version:  trunk
 Severity:  normal          |   Keywords:  has-patch
  Focuses:  administration  |
----------------------------+-----------------------------
 The logic in `WP_Customize_Nav_Menus::search_available_items_query` is
 off. It's combining the `post_type` & `term` queries, which are both set
 at a limit of `20`, but not taking into account that it should only be
 retuning a total of `20` items and instead returns `40`. By limiting both
 offsets to `10` it appears to solve the double item issue, but then
 presents a different challenge. If the height of the browser is taller
 than the initial 20 items and you try to scroll to load more items it
 doesn't work. So we need to initiate search results for page 2 to fill the
 space and make scroll work correctly again. The patch I'm attaching does
 just that.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33404>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list