Multi Site Search Pagination is Broken

the CG Cookie network is running a WordPress multi site install. There is a strange bug happening with the search pagination when on any of the sub sites.

For example, if you go to http://cgcookie.com/blender/, which is one of the sub sites, and do a search for “blender”, you will be taken to a search results page with about 389 items. The first page displays perfectly fine, but if you try to click over to page 2, or any of the other pages, you will be directed to a random tutorial post.

Upon closer investigation, you will notice that the url of the page numbers is of the following structure:

http://cgcookie.com/blender/blender/page/2/?s=blender

This is incorrect, and should be:

http://cgcookie.com/blender/page/2/?s=blender

So, for some reason, the site name is getting inserted into the search URL twice. If I manually remove one of the site names, and enter the correct url, everything works fine. Why is it putting two site names in the url?

It’s important to note that this bug ONLY happens on the search results pagination (not on any of the archives) and it also ONLY happens when on a sub site. If you search for “blender” from the http://cgcookie.com domain, it works perfectly fine.

For the pagination, I am using the function that Kriesi wrote here. Note, however, that I do not believe it is a problem with the function, as the WP Page Numbers plugin had the exact same problem.

I ran into this problem once before, and you can see my question about it here. The fixes described there have made no difference.

Anyone have any ideas?

2 Answers
2

This issue has been raised as a Core Trac Ticket here:
http://core.trac.wordpress.org/ticket/18034

Seems to be the same as this issue:
https://wordpress.stackexchange.com/questions/30780/multisite-admin-bar-search-pagination

Leave a Comment