Page Cannot be Found” When Searching

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) {…}


if ($searchbox && arg(0) != ‘search’) {…}

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

Extracted from

Leave a Reply

Your email address will not be published. Required fields are marked *