I tested on a subdomain site and it was fine. worked as expected.
I did have issues on my subfolder setup, but >I suspect in my case it’s my rewrite rules because I’m on nginx and when I tried going to the 2nd page of search results it was tryng to go to a particular post.
I thought I had this fixed, or maybe I just selectively ignored it. But I continue to have issues on all sites in this network. I have a new quirk: I have a sitewide tags blog set up (not really used, but there); I selected TwentyTen as the theme, and the search seems to work from within the theme. But, the admin-bar still returns bad URL’s for page 2 and beyond.
example: http://famvin.org/anniversary-en?s=paris (which gets a page)
and “previous”:
http://famvin.org/anniversary-en/anniversary-en/page/2/?s=paris (which of course returns the a 404);
I’m guessing it has to do with the Rewrite Rules, but they are pretty standard:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress
If I modify the search URL to add a slash after the sitename (subdirectory) then all is well.
WP Multi-site (subdirectory) 3.2.1
WP SuperCache (could this be a problem?)
I have discovered that <?php bloginfo(‘url’); ?> always returns the url for the sites without the trailing / — even tho siteurl in the wp_options tables all include the trailing slash.
I’m thinking that might be related.
Check your database, under wp_blogs
You should see domain and path as columns. Make sure the path is /folder/
Like I have subdomains, and ALL of mine have path as just / So clearly you need that trailing /
I did check and the paths are correct ( like /en/ or /es/, etc) — I also found in the codex that bloginfo(‘url’) strips the final /
I have a multisite that is subdomains, and these problems do not exist in that network, so I think it has something to do with the subdirectory variation.
I can work around this in search boxes inside my themes by adding the slash. I can’t see how to get that to work in the admin-bar search box.
It may have to do with your server and subfolders.
Does your subdomain install put on the trailing slashes? It’s something you could easily never notice.
I’m also having this exact problem with pagination not working for searches made using the admin bar on a multisite subfolder setup.
I have one network using subdomains and the admin bar search and pagination work fine, but on a new network I am setting up I am using subfolders and although page one of the search results returns the correct results, the pagination for pages 2 onwards keep duplicating the blog URL as per the example given above.
If I add a search box widget the search results and pagination work fine.
Has anybody managed to find a solution to this?
Just realized that the search result for the admin bar search is slightly different than the widget search if this helps to decipher the issue at all:
Admin Bar search example: (sub site/blog on network is called UK)
Page 1 example – http://domain.com/uk?s=test
Page 2 example (not working) – http://domain.com/uk/uk/page/2/?s=test
Widget search example:
Page 1 example – http://domain.com/uk/?s=test
Page 2 example (not working) – http://domain.com/uk/page/2/?s=test
I’ve about given up on this… I even tried working around it using mod rewrite (in my .htaccess) to no avail. I have it happening on 2 separate multi-site subdirectory installs. These are on 2 different hosting services.
It would be nice to know if anyone actually can use page 2 and beyond in a search from the admin search bar in this case.