For anyone else bewildered by the update simply breaking their site, here are some things I have worked out but which I can't find documented anywhere:

- The settings tab moved from being within Input Filters (at admin/settings/filters/customfilter) to its own settings page (at admin/settings/customfilter)

- Whereas before any replacement PHP needed to return a value, now it needs to set $result = that value.

- Whereas before you could* treat $vars as an array, now you must treat it as an object. That means $vars['option_chosen'] now needs to be $vars->option_chosen and so on. (In 6.x-2.x apparently $vars must be renamed $customfilter, just as a heads-up). If you are getting white-screen-of-death errors, this may be what is causing it.

(* This may have been an undocumented and unintended feature.)

In future, it would be great if such significant changes to functionality could be made very obvious in the readme files etc. Thanks.

Comments

apaderno’s picture

Version: 6.x-1.0-beta9 » 6.x-1.x-dev
Category: bug » task
apaderno’s picture

Title: Missing documentation for changes from 6.x-1.x-dev to 6.x-1.0-beta causes big headaches » Missing documentation for the last changes
Status: Active » Fixed
Issue tags: +6.x-1.0-beta10, +6.x-2.0-beta6

I updated the file README.txt, and added a reference to the constant CUSTOMFILTER_API.

If the file needs to be updated, please feel free to re-open this report.

apaderno’s picture

FYI: version 6.x-2 allows to use the variable $customfilter as it would be an array; $customfilter->info and $customfilter['info'] return the same value (NULL in the case the property has not been previously set).

Status: Fixed » Closed (fixed)
Issue tags: -6.x-1.0-beta10, -6.x-2.0-beta6

Automatically closed -- issue fixed for 2 weeks with no activity.