Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Dec 2007 at 22:12 UTC
Updated:
22 Aug 2008 at 18:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
jennycita commentedWoo-hoo! This patch saved me a great deal of debugging. Works beautifully. Thanks!!
Comment #2
darren ohPatch works well in my tests.
Comment #3
mikeryanIt breaks under Postgres with "Query failed: ERROR: argument of AND must be type boolean, not type integer".
Replace "0" with "FALSE", and it'll work for both MySQL and Postgres...
Thanks for tracking this down.
Comment #4
appel commentedPatch seems to work fine (with "0" replaced by "false"), thanks! Now if only I could make searching less strict...
Comment #5
Kripsy commentedWorks just fine for me. Thank you.
Comment #6
darren ohAttached patch uses FALSE instead of 0.
Comment #7
claudiu.cristeaTested. Works fine!
Comment #8
dmhouse commentedI've just come across this bug as well. Seems this issue has been open for almost 7 months now. The patch is sensible, works, and has been reviewed by the community. The bug is annoying and high-visibility. Any chance this could get committed?
By the way, you can work around this bug in code by doing a SELECT COUNT(*) FROM temp_search_sids; if there were no results, this query will return 0.
Comment #9
wOOge commentedThanks you so much for this — it works perfectly!!
Comment #10
dmhouse commentedCorrection: my above workaround doesn't function correctly in the case that you search for something that search_parse_query deems too small to be worth it, e.g. "to". Then temp_search_sids isn't created at all, and trying to select from it will give you an error. You can detect whether the table exists if you're running MySQL version 5.0.2 or greater you can use SHOW FULL TABLES LIKE "temp_search_sids" to check for its existence. Otherwise the only solution is to run search_parse_query again. For example, here's how I work around this issue:
So for this old, high-visibility bug (nearly everyone using Views search will come across it), there's no easy workaround and it's very confusing. But we have a simple, reviewed patch. Is no-one on this project watching the bugs? Can we commit it already?
Comment #11
jesss commentedThis patch didn't work for me.
In searching for a fix, I also found this issue (#175066: No empty result with exposed Search: Index filter) which implies this behavior is by design. Why, I don't know...
Comment #12
Zoologico commentedI got around this using:
http://drupal.org/project/views_fastsearch
Instead of the default Search Index.
Comment #13
jesss commentedI did a fresh install of Views, and now the patch works.
Comment #14
merlinofchaos commentedCommitted
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.