Fix endless redirection issue with Drupal Google CSE and Search 404 module

When using the Search 404 module and Google CSE (Custom Search Engine) together, the result is an endless redirection that will… well, you know, loop endlessly and stop you from doing more important things, like getting to your search results.

The problem occurs in at least Search 404 version 6.x-1.7.

This can be easily fixed by changing one line into two in the /sites/all/modules/search404/search404.module file.

On line 117, in function search404_page(), change

drupal_goto ('search/google/'. $keys);

into

$_REQUEST['destination'] = 'search/google/'. $keys;
drupal_goto();

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>