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.
In the curent 7.x-1.7 version, if you put stuff into the popup area of the block, then later remove all the custom bits from the search Block, then Custom Search will throw 'Undefined index'. The attached patch stops them from happening and freaking out users.
Comment | File | Size | Author |
---|---|---|---|
fix-undefined-index-errors.patch.gz | 570 bytes | jrsinclair |
Comments
Comment #1
marcoka CreditAttribution: marcoka commentedi can confirm that bug
Notice: Undefined index: article in custom_search_form_alter() (Zeile 185 von /var/www/WORKSPACE_DRUPAL/drupaltest/sites/all/modules/contrib/custom_search/custom_search.module).
will test the patch later
Comment #2
victory17 CreditAttribution: victory17 commentedHaving undefined index issue.
•Notice: Undefined index: or in node_search_validate() (line 2738 of modules/node/node.module).
•Notice: Undefined index: negative in node_search_validate() (line 2743 of modules/node/node.module).
•Notice: Undefined index: phrase in node_search_validate() (line 2748 of modules/node/node.module).
Will test patch..
Comment #3
prathK CreditAttribution: prathK commentedTested patch by adding the Taxonomy: Tags,Advanced search criterion ,Submit button, Search box, Custom search paths.. It seems to be working.. no undefined index issue for the popup.
Comment #4
prathK CreditAttribution: prathK commentedComment #5
jdanthinne CreditAttribution: jdanthinne commentedThe patch wasn't against the DEV version (it always should be), but I've found a way to do it…
Additionally, I've made changes to the i18n submodule that was also giving some undefined indexes as well.
I've pushed that to DEV, so please try next dev (from tomorrow) and review.
Comment #6
prathK CreditAttribution: prathK commentedHi jdanthinne,
I have tested the same with the latest dev version it seems to be fixed in that version.
The patch worked for the same.
Comment #8
Zachmo CreditAttribution: Zachmo commentedHave the same issue as you, patch didn't resolve my error. You could be experiencing something similar to #1208652: Notice : Undefined index: in node_search_validate() .