It seems that the result of a Global: PHP field in filters is not working as I was expecting (the returning TRUE or FALSE is used on both ends of an OR filter instead of only on the side where it was set).
I have nodes with 2 dates, in this case either the first date should be in the past AND a session variable should be set OR the second date should be in the past to show the node as a result.

When I add only the dates in the OR filter setup it works as expected but as soon as I add the PHP field both cases will only show when the session variable is set and either date has passed.

EG:

Date-private = 2012-01-10 (session var needed)
Date-public = 2012-01-20

Current date = 2012-01-15
With session var set: node displayed - OK
Without session var set: node hidden - OK

Current date = 2012-01-21
With session var set: node displayed - OK
Without session var set: node hidden - FAILED

On the 21st the node should be displayed as the date-public should only be checked, not the session var, but it seems that the session var is still being checked.

As a test I changed the date-private to 2012-01-30, keeping the current date on 2012-01-21 the node should still be displayed because the date-public (2012-01-20) has passed, but still it will only show up when I set the session var.

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Views PHP Filter
Version: 7.x-3.1 » 6.x-1.x-dev

Let's move to php filter module

gnassar’s picture

Project: Views PHP Filter » Views PHP
Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Filter Handler

Nope, not ours; we use Node: PHP, not Global: PHP. Also, we don't have a 7.x version out in dev yet. Pushing to Views PHP, which has both.

wesjones’s picture

Any progress on this or does anyone know of a workaround?