Hello,
Working on a multi-language site.
When using the form on the top of the result page, I've got these 3 notices :
Notice : Undefined index: or in node_search_validate() (ligne 2738 in /modules/node/node.module).
Notice : Undefined index: negative in node_search_validate() (ligne 2743 in /modules/node/node.module).
Notice : Undefined index: phrase in node_search_validate() (ligne 2748 in /modules/node/node.module).if I don't have custom_search enabled, I've got no messages and search system is doing his job has expected.
Seems like maybe the system didn't like the deactivation of the advanced search ? Or something else...
Thanks for your help.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | custom_search-node_search_validate-1208652-11.patch | 4.42 KB | soulston |
| #9 | custom_search-node_search_validate-1208652-9.patch | 4.27 KB | rooby |
Comments
Comment #1
anouAfter searching a bit, seems like custom_search is not defining these 3 variables :
I try to find where it should define them...
Comment #2
anouI didn't had time to search a lot so I modified the node.module file (I know it's bad, but I'm naughty) :
Before line 2738, I insert :
Hope someone find something else...
Cheers.
Comment #3
Zachmo commentedI'm also having this issue. Looks like this is a quick fix from the previous post.
Changed priority cause it looks like it has been sitting for a while and needs to be addressed.
Comment #4
Zachmo commentedOk, so it looks like this is only happening when you submit a search from the actual search page. When I submit a search from the "Search Form" block it doesn't run through the node_search_validate function so this error is never thrown.
Looking at the custom_search.module file it looks like the issue could have something to do with these lines...
Simply changing the unset function to setting the variable to an empty string, which is what the error is wining about, didn't work :(
Comment #5
jdanthinne commentedIn the DEV version, I've just changed
by
and the error seems to be gone.
Please test and review next DEV.
Comment #6
steltere commentedI just uninstalled the release version and re-installed the dev version, and I'm still getting the error. I've doublechecked, and the changes you made to lines 110-112 are there. I've also cleared the cache and run cron, just in case there was something somehow left over from the previous version.
Still, no change.
Comment #7
MostlyGhostly commentedI also have the same error and made the changes suggested above - the error remains. I've reverted my file back to it's original state for the time being.
Any ideas?
Comment #8
MostlyGhostly commentedComment #9
rooby commentedThe problem is if you have the 'Display advanced search' checkbox unchecked then it unsets the whole 'advanced' parent element.
This patch fixes it for me.
(sorry about the semi-unrelated coding standards fixes, I was finding it hard to follow without those - I can remove them if preferred)
The main part is:
Comment #10
adelka commentedI tried this solution, but it is not working for 7.x-1.9 version. The bug is still there :(
Comment #11
rooby commented@adelka:
As mentioned in #5, there have been some fixes done in the dev version.
Then my patch in #9 adds to that.
So you currently have to be using the dev version, with the patch in #9, until 7.x-1.10 comes out.
Comment #12
soulston commentedThe patch didn't work for me until I put an extra line break at the end?
All the credit goes to @rooby. I just added a line break.
Comment #13
rooby commentedI actually have commit access now so I will commit this soon.
Comment #14
jdanthinne commentedI've just pushed the fix to the DEV version.
Thanks rooby.