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.

CommentFileSizeAuthor
fix-undefined-index-errors.patch.gz570 bytesjrsinclair
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoka’s picture

i 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

victory17’s picture

Having 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..

prathK’s picture

Tested 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.

prathK’s picture

Status: Active » Needs review
jdanthinne’s picture

Version: 7.x-1.7 » 7.x-1.x-dev

The 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.

prathK’s picture

Status: Needs review » Fixed

Hi 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.

Status: Fixed » Closed (fixed)

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

Zachmo’s picture

Having 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...

Have 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() .