Having recently upgraded to Wordpress 2.7, my “production” blogs have been suffering from a missing search widget in the sidebar. Curiously, my “test” installations on my local machine did not experience this sad loss. Wordpress 2.7 is, in my opinion, a wonderful release so I am very happy to say that I have at last manage to get to the root of my problem and fix it. Mea culpa, of course.

There had to a difference between my test and production system to explain the different behaviour. Since I had performed my Wordpress installations locally first, then simply copied the Wordpress directories and files up to the “production” server, it shouldn’t be anything different in the Wordpress files. That left my very own theme files, so I started looking for differences there.

I’d seen some comment in the source code for one of the Wordpress PHP files along the lines of, “use search form if one exists”.  Lo and behold, in my theme files on the production systems, a very suspicious-looking searchform.php file. Oh look, there’s no file called searchform.php in my test installations. Crikey! A swift delete of searchform.php from the production system and after a quick refresh, as if by magic, my search widget made a miraculous reappearance in Traveblog and Gastroblog. Terrific, now I can search recipes by ingredient again.

Since I have absolutely no recollection of having put a searchform.php in my theme, I can only conclude that senility has taken hold. :(

OK, for two days now I’ve had no less than six installations of Wordpress 2.7 up and running, three development instances on my local machine and three live instances on the server I use. On both machines the three instances are for Traveblog, Gastroblog and my Guestbook.

The sidebar in Wordpress can be built up from a series of optional so-called “widgets”; one can pick and choose them to suit one’s own blog design.  For example, one such available widget is the search widget, others include the categories widget and archives widget (see right).

In all three installations on my local machine the search widget works perfectly well. In all three installations on the web server the search widget fails to appear (again, see right – Search should be above Categories). I’ve tried deleting and re-adding the search widget, resequencing the widgets in the sidebar but all to no avail – search stubbornly refuses to put in an appearance. Neither does it matter which browser I use so I don’t believe it to be an underlying CSS issue.

It’s frustrating and I’m confused. If anyone has any constructive suggestions … :(

Technorati Tags: ,,