Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
15 Jul 2011 at 18:16 UTC
Updated:
8 Sep 2017 at 10:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedOn a nother display in the same view, I have a node reference field set to "not empty". Since the upgrade, I am no longer able to edit this field. It seems to be the cause of the error. I was finally able to remove it via the "filter and/or" feature, which luckily has a "remove" option.
Then, trying to re-add the filter, I get a 300s server time-out.
What's up with this? Reverted back to rc1.
Comment #2
merlinofchaos commentedIs this http://drupal.org/node/1207680 ?
I don't know where that string is coming from:
Comment #3
ungabunga commentedSame error. Helped rollback to rc1.
Comment #4
akoepke commentedI have had this same problem and it is not the same issue as being discussed in the other thread. Similar, but not the same.
I have had a look at the latest copy of Views dev (released today) and the misspelled string can be found.
In my case this error only appears on Views where I am using the IS NULL operator. The function causing the issue is as follows (handlers/views_handler_filter_in_operator.inc line 360)
In my case $this->operator contains empty and $this->operator_values(1) contains Array ( [0] => in [1] => not in ).
The function $this->operator_values(1) only returns operators which require values. The empty and not empty operators don't and so it fails validation. If this line is changed so it includes a check against $this->operator_values(0) as well, then the validation fails further down with No valid values found (Line 384).
Looking at this validate function, there seems to be no support at all for the empty and not empty operators. Would it be best to just validate them at the start with a simple check and then leave the rest to those operators with values?
Adding in the following lines to handlers/views_handler_filter_in_operator.inc:, before the other operator check, has solved this issue for me.
This way if the operator is valid and does not require a value then no further validation is required. Does this sound like a good solution to the problem.
Comment #6
akoepke commentedcomment removed
Comment #7
clashar commented+1
Comment #8
dawehnerPlease always write a proper patch, it's much easier to review.
Comment #9
clashar commentedFor me error occurs only when I add "Location:Country" to Fliter Views.
No problem if it's "Location:City", "Location:Province", "Location:Phone"
Should it be another issue?
Comment #10
akoepke commentedHi dareine,
As requested, here is a patch file for those 3 lines. I have made it against the latest dev version which was released today (one with the spelling error corrected).
Comment #11
clashar commentedI've applied patch but it didn't help me
Comment #12
akoepke commentedYep, your issue is different to mine so most likely a different cause :)
Comment #13
jocken commented#10 worked for me, no errors!
Comment #14
dawehnerRewrote the comment and commited the patch to both version. Thanks!