Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a bit of code, which I've managed to trigger on line 205 of search404.module that displays the following message to a logged in user, in some circumstances, when you hit a 404
"The page you requested does not exist. For your convenience, a search was performed using the query %keys".
Code change below required. I'm not sure if this was intentional or not?
index 7e1fb55..01a8185 100644
--- a/docroot/sites/all/modules/contrib/search404/search404.module
+++ b/docroot/sites/all/modules/contrib/search404/search404.module
@@ -202,7 +202,9 @@ function search404_page() {
else {
// Normal $results['#results'] doesn't exist, we will not redirect
// and just hope the strange search module knows how to render its output.
- drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+ if (!variable_get('search404_disable_error_message', FALSE)) {
+ drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+ }
}
}
}
Comment | File | Size | Author |
---|---|---|---|
#1 | not_checking_for_disable_error_message-1940006-1.patch | 851 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch to comment 1
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedChanging to needs review.
Comment #3
zyxware CreditAttribution: zyxware commentedThanks for the bug report and the patch. The patch has been applied in the latest dev version
Comment #4
zyxware CreditAttribution: zyxware commented