If I set a view to be distinct and also have an attachment on the view with distinct set, the summary view in the attachment doesn't actually use DISTINCT. This is in line 495 of argument.handlers.inc.
If I set a view to be distinct and also have an attachment on the view with distinct set, the summary view in the attachment doesn't actually use DISTINCT. This is in line 495 of argument.handlers.inc.
Comments
Comment #1
merlinofchaos commentedI committed something that ought to fix this; I don't have any good test scenarios tho so I'm not 100% sure.
Comment #2
aclight commentedIn case you don't catch what I mentioned in IRC, here's what I said:
[12:37] shouldn't that be && empty($this->query_>no_distinct) ??
[12:42] merlinofchaos: also, $this->query->distinct is always 0 at that line, even though for the display in question I have both Distinct: Yes under basic settings and reduce duplicates under the argument handler options selected
Comment #3
merlinofchaos commentedTry THIS version =)
Comment #4
aclight commentedNope, that doesn't work either :(
I get the following error message:
Using a debugger, it doesn't look like $this->display exists at this point.
Comment #5
aclight commentedhttp://drupal.org/cvs?commit=123183 fixed the typo here. I'm marking this is fixed but haven't yet tested the functionality yet.
Comment #6
aclight commentedSo in the fix you have this line:
but it seems to me like we don't want to negate the first test. In other words, it should be
The later works for me in the particular situation I wish to use this, and seems to make sense from a logical standpoint. Was the '!' a typo or is there some greater logic I'm missing?
Comment #7
merlinofchaos commentedThe ! is a typo; leftover from getting rid of an empty and forgetting that removing the empty() reverses the logical value.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.