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.
Shows duplicate error message when the search404_error_message() is called twice inside search404_page(). I'm using custom search so for me it's called on lines #162 and #219 inside [search404.page.inc].
Change the drupal_set_message() line to include FALSE as the third argument.
function search404_error_message($keys) {
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' => $keys)), 'error', FALSE);
}
}
Comment | File | Size | Author |
---|---|---|---|
#2 | duplicate_error_message-2757875-2.patch | 385 bytes | anish.a |
Comments
Comment #2
anish.a CreditAttribution: anish.a at Zyxware Technologies commentedI have changed the patch to confirm to latest 7.x branch.
Comment #5
anish.a CreditAttribution: anish.a at Zyxware Technologies commentedAlso added a Drupal 8 port.
Comment #6
anish_zyxware CreditAttribution: anish_zyxware at Zyxware Technologies commentedMerged the patch. Thanks @sitewits