Hi There,
there seems to be an instability with Display Suite and the Search404 module.
Instead of displaying Search404's search results page in place of a standard 404 page, the search results break with the following error and the search form isn't even displayed.
Notice: Undefined index: module in ds_search_form_search_form_alter() (line 505 of G:\wamp\www\nursery\sites\all\modules\ds\modules\ds_search\ds_search.module).
Combined, both of these modules provide a great way to manage search results display and 404 errors. It would be great if they could work together.
This was touched at Search404 with issue #1253426: Patch: Search 404 should use default search engine, it may help shed some light on where the issue actually lies...
Comments
Comment #1
Anonymous (not verified) commentedIssue is still valid for 7.x-1.5. And I assume it's a bug to access non-existent array keys.
I added an array_key_exists('module', $form). It removed the notice of course.
Search404 still doesn't display the search form. I can't tell, if this is due to DS or a bug in Search404. Someone with better understanding of the Form and Search API should have a brief look at it. Just to assess, if theres is a need for action or how to deal with it for now.
Comment #2
Anonymous (not verified) commentedThis is the $form array passed into ds_search_form_search_form_alter():
Comment #3
swentel commentedIt's not because there's a conflict with a module that this is automatically a bug report :)
Comment #4
Anonymous (not verified) commentedSo the input for form_alter is corrupted by Search404? For me it looked like DS doesn't deal properly with (valid) arguments passed to a core hook.
Comment #5
joelpittetLatest search404 7.x-1.x dev branch fixed this for me.
Comment #6
swentel commentedClosing as per #5
Comment #6.0
swentel commentedCorrected spelling mistakes..!