I'm not sure what I'm doing wrong but I cant get the Global Filter Block 1 to save its configuration.

After installing the module, I went to the block page, assigned it to a region and clicked on configuration. I set the filter driver to "field', and chose a term referenced field from a content type, Field: County (field_county), for my global filter. I set the widget to "single dropdown", checked autosubmit and saved.

Once I'm back on the block page, I see this error repeated 11 times:
Warning: Wrong parameter count for strstr() in _global_filter_extract_filters_from_form() (line 417 of ../sites/all/modules/global_filter/global_filter.blocks.inc).

I've tried to flush the cache, add code to the index.php, switch from stable to dev, place this block above the page content but still can not save the configuration.

Need help

Comments

RdeBoer’s picture

Could it be that your version of PHP is older than 5.3.0 ?
You can check the version number on your Drupal site on the Status Report page, .../admin/reports/status.
Rik

amh5514’s picture

Dagnammit! Yes it is. Are there any other option? I plan to update to 5.4 but I have 7 more sites to upgrade from D6 to D7 first

RdeBoer’s picture

Assigned: Unassigned » RdeBoer

Here's a workaround for versions of PHP older than 5.3.

Change this line, line 417 in sites/all/modules/global_filter/global_filter.blocks.inc, the line that has to error, from:

     $key = strstr(drupal_substr($form_key, $l), '_', TRUE);

to

    $key = (int)drupal_substr($form_key, $l);

That should do it. But with this workaround, make sure not to user more than 9 Global Filters on your site.

amh5514’s picture

PERFECT!!

Wonderful module that is wonderfully maintained. Thank You!

amh5514’s picture

Status: Active » Closed (fixed)
RdeBoer’s picture

Thank you. Hope you get great mileage out of Views Global Filter.

Don't wait too long with upgrading to 5.3.x or later. Suggest at least 5.3.9

D8 requires 5.4, but now we're getting really ambitious.....

RdeBoer’s picture

Title: Can not save initial block configuration » Can not save initial block configuration -- requires PHP 5.3.0 or later
RdeBoer’s picture

Title: Can not save initial block configuration -- requires PHP 5.3.0 or later » Save initial block configuration -- requires PHP 5.3.0 or the workaround inside this issue