By dannyboy26 on
Hey Guys
Hoping someone can shed some light on something that's puzzling me.
I recently installed Drupal, and all the links are working fine, except for search. When I enter anything in the search box at top right of page and then select 'Search' I get a 404 error.
For instance if I search for food the Address bar shows the URL as:
http://www.mydomain.com/search --> which gives the 404
On other Drupal sites when I perform a search, the URL becomes:
http://www.yourdomain.com/search/node/food
... so something is clearly going wrong! Any ideas?
Many thanks,
Dan
Comments
Clean URLs issue?
It sounds to me like a mis-configuration of the search module, or there might be something a-miss in your Clean URL configurations or .htaccess file. If your installation is available for review, please send me the URL so that I can take a look and see.
I have run into a few search errors and mis-behaviours myself. Also please indicate the version of Drupal that you are working with
-----
Web Development, Production & Marketing Advice - http://www.cmsproducer.com/26/3
Theme broken
Most likely your theme has a broken search box.
--
If you have a problem, please search before posting a question.
Broken search box
Hi Steven
Thanks for the message. How can I check if my theme has a broken search box?
I haven't touched any of the theme files at all and am using the default Bluemarine template.
Thanks
Dan
Searching while 'bypassing the theme'
To exclude the theme from the search entry, try calling the URL
http://www.yourdomian.com/search/searchword
I see that in the example you gave there is the word 'node' in between search and the search word... that is making Drupal think that you are calling a node/page with the path named 'searchword'
-----
Web Development, Production & Marketing Advice - http://www.cmsproducer.com/26/3
Thanks
Thanks for the input idonny!
I've solved it now... I had a file in the Drupal root called search.php: think the server was getting confused by this file, even though the URLs were /search/searchterm as when I renamed it the search function started working again.
Cheers
Dan
Observations - Don't mention it
I have looked at the site and I see that you are running it in a sub-folder fo the domain.
- Please make sure that you have indicated the subfolder in your .htaccess
- The search module you are using might need to be replaced (assuming that you are running drupal 4.6+). I am able to search for things, but the search results are not clickable, therefore not very useful once you find what you are looking for.
You can download the drupal version that you are using againa nd just upload the search module file (rename the existing one first so that you can revert to it if the new one proves to be damaging). Did you manually install your Drupal or did you use some tool? It does not behave like the regular Drupal we all use.
Let me know if I can be of further assistance
-----
Web Development, Production & Marketing Advice - http://www.cmsproducer.com/26/3