Needs work
Project:
Better Select
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2008 at 14:22 UTC
Updated:
3 Mar 2010 at 12:32 UTC
latest d6.
Removed better select and it all worked again.
If user edited an item in that was in any other menu other then navigation it then was placed in navigation even if they did not have perms to edit a menu.
Also (see attached image) if you go to advanced search the search terms where a broken array.
Good luck,
| Comment | File | Size | Author |
|---|---|---|---|
| betterselecterror.png | 20.38 KB | yurtboy |
Comments
Comment #1
Mark Theunissen commentedThe first issue is a duplicate of #283768: Breaks menu system.
Secondly, the checkboxes will now not appear if the format of the options are invalid... see #362746: Check that #options are valid, else abort conversion to checkboxes.
We can enable support for the advanced search form by somehow supporting the method of having multiple vocabs in one multi-select box.Thoughts?
Comment #2
Mark Theunissen commentedComment #3
broonIMHO it's not the vocabs that are breaking the advanced search but the conversion to checkboxes. Try searching for a term via the normal search box (best if you have a term which only yields a few results). You'll get the search results page where you could set advanced options. Instead just click the search button once more without changing anything. With better_select installed I'll suddenly get no results no more.
My explanation: w/o better_select the search operator "category:" only is fired when one or more tags (taxonomy terms) is selected. With better_select all options are converted to checkboxes which always return a value (even if unchecked a zero is returned). So, with 5 taxonomy terms in your vocab and none selected " category:0,0,0,0,0" is appended to search string.
In node.module, function node_search, the search query gets expanded if the operator is found:
and the query will contain something like "tn.tid = 0". Since no term is selected this is the only condition for terms and since there is no term with id 0, no results will be returned (it actually works if at least one term is selected since the conditions are concatenated by OR). Altering node_search to
takes care of the problem and makes the advanced search working again.
But, if you have search_files installed this will still break the search in files/attachments because there no handling of keywords is given. A quick&dirty workaround would be to insert one line in search.modules function do_search to remove the serialized empty string of categories:
That way, I got advanced search working again for nodes, files (directories) and attachments. However, this is core module hacking and not safe for updates.
I don't know if this could be done by using some hooks or query altering mechanisms, I'm still looking for a better solution but I thought I'd still share my experience so far.
Best,
Paul