Hi,

PHP filter doesn't work anymore in my system. I updated
few modules (critical Views, stable PHP filter, etc) and...
PHP filtering is gone.

I haven't changed anything what could be related.
I haven't changed the views.

Yes, I have relationships (two) in my non-working views
and I have seen appropriate thread.

Anybody else? :]

Szy.

Comments

robcarr’s picture

I seem to have a similar problem... but I've only just started using the module, so can't comment on the history/update of other contrib modules. The PHP Filter works fine in test mode with comma separated variables; my PHP code I know generates a valid array... but when the tested PHP code is inserted and the handler set to PHP, the filter doesn't do its job.

Mystified, and not really sure how to trace this. Would welcome any advice too.

FI using PHP 5.2.13 and Views 6.x-2.12

csedev’s picture

Having the same issue.
Worked like a charm until I updated my modules to the most recent versions.
Now, it doesn't work.

lahode’s picture

Version: 6.x-1.x-dev » 6.x-1.0

Hi,

Until now, I used Views PHP Filter 6.x-1.0-beta1, that worked fine. I tried to install version 6.x-1.0 and 6.x-1.x-dev. Both showed me the following message, when I tried to display my View on a node style (field style seems to work).

Message:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /afcimpots_public/declaration-pp.

Reason: Error reading from remote server

dannygoh’s picture

StatusFileSize
new33.69 KB
new29.83 KB

Hi,

Version 6.x-1.0 of the Views PHP Filter does not like zeros and negative return value (node ids) from your viewsphpfilter php code. During the execution of the views, Views PHP Filter will iterate through every single values (node ids) returned by your php code, If it finds ANY zero or ANY negative values, it will break out of the loop before logging an error in WATCHDOG, and finally return false without affecting the original views query!

This is how I resolved the issue: (please view the attachments)
1) Navigate to your site's "Recent Log Entries" page (e.g. http://example.com/admin/reports/dblog/).
2) Look for error such as this, "Invalid return value in PHP..." or "PHP filter returned null; filter ignored".
3) Click on those links to see the detail error report and the actual return values of your viewsphpfilter codes.
4) Tweak your viewsphpfilter codes to avoid 0's and negative node IDs.

Hope this help someone.

mist’s picture

Category: bug » task
Priority: Normal » Minor

subscibing

gnassar’s picture

Status: Active » Closed (works as designed)

The comment in #4 is correct. There is no case where a negative value is a valid node ID. If the module finds one, it assumes the generating code is flawed and doesn't allow it to affect the rest of the view. It logs this error in the Drupal log. This is as intended.