"Page Cannot be Found" When Searching

admin's picture

I had a strange problem on this site. Every time I try to search it gave me "Page Cannot be Found"

Luckily there is an easy fix to this problem in 5.1.

1. Disable the search block (Go to "administer -> site building -> blocks" for this)

2. enable the search box (Go to "administer -> site building -> theme -> your theme" and enable the checkbox for search)

3. then modify the page.tpl.php in this way:

instead of:

if ($searchbox) {...}

write:


if ($searchbox && arg(0) != 'search') {...}

in this way the searchbox will not be displayed on the search page.

Extracted from drupal.org/node/103909


's points

Points are visible to logged in users only

descriptionvalue
Members2246
Posts217
Comments112
Reads today
Reads all time
Hits today0