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);
  }
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sitewits created an issue. See original summary.

anish.a’s picture

Status: Active » Reviewed & tested by the community
FileSize
385 bytes

I have changed the patch to confirm to latest 7.x branch.

  • anish.a committed 78c8c0b on 7.x-1.x
    Issue #2757875 by sitewits, anish.a: Duplicate error message
    

  • anish.a committed ad21eba on 8.x-1.x
    Issue #2757875 by sitewits, anish.a: Duplicate error message - Port to...
anish.a’s picture

Also added a Drupal 8 port.

anish_zyxware’s picture

Status: Reviewed & tested by the community » Fixed

Merged the patch. Thanks @sitewits

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.