Related to the fix at #644174: Share arguments won't work
The where clause I'm trying to create is this one...
WHERE (node.type in ('school')) AND (node.status = 1) AND (term_node.tid = 719 OR term_node.tid = 777)
The number 719 needs to be passed in via an argument and the number 777 needs to be fixed.
For the second term ID, I chose to add a second argument (that I know will never be provided) and set the "Action to take if argument is not present" to "Provide default argument" with a "Fixed entry" of 777.
When I check the box for "Share arguments" on the "Views Or: Next alternative" argument everything works as expected, and the query generated is
WHERE ((node.type in ('school')) AND (node.status = 1)) AND (((term_node.tid = 719) AND (term_node.vid IS NOT NULL)) OR (term_node2.tid = 719))
You can see that it is comparing both term_node.tid and term_node2.tid to 719 (the argument)
However, when I UNcheck the box for "Share arguments" on the "Views Or: Next alternative" argument the query refuses to run at all:
No query was run
Un-doing the patch provided at #644174: Share arguments won't work solved my issue. :/ Reverting to the previous if / else statement generates the correct where clause
WHERE ((node.type in ('school')) AND (node.status = 1)) AND (((term_node.tid = 719) AND (term_node.vid IS NOT NULL)) OR (term_node2.tid = 777))
Comments
Comment #0.0
jenlamptonclosing paren
Comment #0.1
jenlamptonadded update.
Comment #1
roball commentedjenlampton, my View that used this module also stopped to work when upgrading the dev snapshot to the current rollout (2011-Nov-05). This is quite a critical bug.
Since there has never been pushed out a release and it seems that there will never be one, I would recommend to no longer waste time on this module at all and use Views 6.x-3.x (which is already on 3.0rc3) instead which will also provide this functionality.
Comment #2
jenlamptonViews three has no intention of supporting OR for arguments
#141342: Allow disjunctive conjunction (OR) of arguments
though it's true that there is suport for OR for filters.
Comment #3
darren ohFixed in commit 7f4321f. Reversed commit from #644174: Share arguments won't work. Thanks for reporting this issue.
Comment #4.0
(not verified) commentedadded new where clause