[wp-trac] [WordPress Trac] #11330: Empty search takes you to homepage instead of empty search page

WordPress Trac noreply at wordpress.org
Tue Jul 22 10:39:48 UTC 2014


#11330: Empty search takes you to homepage instead of empty search page
--------------------------+-----------------------------
 Reporter:  jacobfogg     |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  closed
 Priority:  low           |   Milestone:  4.0
Component:  Query         |     Version:  2.8.5
 Severity:  minor         |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+-----------------------------
Changes (by kovshenin):

 * keywords:  has-patch commit =>


Comment:

 Reporting some infinite scroll breakage (again), sorry! Since IS builds
 off of query_vars and not query, the scroll request sets an empty search,
 which is expected given this change. The results are still correct,
 however the context is wrong.

 IS uses a theme's content.php file to produce output, and many such files
 will display `the_content()` or `the_excerpt()` based on `is_search()`,
 like Twenty Twelve, so when scrolling Twenty Twelve is loading excerpts,
 rather than the post content because with an empty s the context is always
 search.

 Changing IS to build the query from query and not query_vars seems to fix
 the issue, but reporting it anyway, just in case you guys wanna revert
 this ;)

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


More information about the wp-trac mailing list