localgovdrupal / localgov_search

Default sitewide search implementation for LocalGov Drupal.
GNU General Public License v2.0
0 stars 1 forks source link

Empty error status message displayed on pages #6

Closed stephen-cox closed 3 years ago

stephen-cox commented 3 years ago

With the new theme there's an empty error status message displayed across the top of every page. Turns out this is because we're hook_form_altering the search block to make it required.

Commenting out this like fixes the issue, but means that people can submit empty searches which was not wanted when specifying this: https://github.com/localgovdrupal/localgov_search/blob/d01f3fbe445751547bb9a9eb4019dbd9c18f880d/localgov_search.module#L98

Rather than using a hook_form_alter to make a search term required in the header search block, it can be set in the block plugin code and this solves the issue.