[wp-trac] [WordPress Trac] #18034: Incorrect URL for second page of search results

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 12 20:02:53 UTC 2011

#18034: Incorrect URL for second page of search results
 Reporter:  mark.waters   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.3
Component:  Multisite     |     Version:  3.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
Changes (by SergeyBiryukov):

 * keywords:  reporter-feedback => has-patch
 * component:  General => Multisite
 * milestone:  Awaiting Review => 3.3


 Ah, I was only checking a single site install.

 This is a combination of several issues:

 * Unlike `get_search_form()`, admin bar misses a slash when calling
 `home_url()`: [[BR]]
   Should be: https://domain.tld/blogname/?s=test [[BR]]
   Actual: https://domain.tld/blogname?s=test
 * For some reason, canonical redirect from ?s=test to /?s=test only
 happens on the main site.
 * `get_pagenum_link()` then fails to properly replace `$home_root` in
 template.php#L1487 [[BR]]

 [attachment:18034.patch] fixes the first issue. Doesn't touch canonical
 redirect or `get_pagenum_link()`.

Ticket URL: <http://core.trac.wordpress.org/ticket/18034#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list