Closed (duplicate)
Project:
Views PHP
Version:
7.x-1.x-dev
Component:
Filter Handler
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2012 at 15:25 UTC
Updated:
15 Apr 2012 at 08:22 UTC
I've created a view and added a php filter and added : return TRUE; to the filter code. It says that if it returns true the row will be removed from the results, therefore if every row returns TRUE, no results should be displayed.
It makes no difference for me, I get all results returned.
Am I missing something obvious here?
Comments
Comment #1
iancawthorne commentedThis is possibly related to the type of view. I can now get this working ok with a content view, but I am using search api and have a "node index" view. The php filter is available, which would suggest it should work, but it appears it does not.
Comment #2
johnvHi, this is already reported in #1222448: Views PHP Can't Filter
Comment #3
iancawthorne commentedI don't think this is a duplicate. Issue #1222448 relates to a node type view, which I can get working fine.
For example on a node type view, you can enter return TRUE or FALSE as the only code for the php filter and can see that it works.
In this case for a search_api view, the same code makes no difference.
Comment #4
johnv@iancawthorne, OK. on my system, filter doesn't work for a node view either...
Comment #5
johnvYou can find more info here: #1140896: Variable $row does not contain correct values ($data->_field_data does)
Comment #5.0
johnvTypo corrected.