A warning message when unchecking the filter.

ms1 - September 30, 2007 - 11:44
Project:Formfilter
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi

First of all, thank you for creating this excellent module. It helped me do something for which I had been trying for days.

But there is a small issue -
When I uncheck (unhide) certain elements that I decided to hide initially using formfilter, I get a warning, i.e.

warning: array_filter(): The first argument should be an array in C:\apache2triad\htdocs\drupal-5\modules\formfilter\formfilter.module on line 140.

Thanks & Regards

#1

nedjo - September 30, 2007 - 15:18

Thanks for the note, could you give an example of the elements you're getting this with? Please identify as closely as you can, i.e. "the x field in the x form as produced by x module" or, if possible, "the field that's defined in module-code as follows:

<?php
$form
['myfieldset']['myfieldset'] = array(
  ...
);
?>

".

Thanks.

#2

ms1 - September 30, 2007 - 17:34

Hi

Its not module specific.

The warning appears whenever I uncheck the last element for any form.

For ex:
If I checked 3 fields to hide. Then
Case a) when I uncheck first field and submit --- NO ERROR
Case b) when I uncheck first second and submit --- NO ERROR
Case c) when I uncheck first third(last) and submit --- Then the warning comes.

----------------------------
NOT ONLY THIS:
There is an issue when I am logged in as any other user (other than admin). It so happens that

1. for any content-type for which I used this filter, and then unchecked all, I get a warning, i.e.

warning: array_keys(): The first argument should be an array in C:\apache2triad\htdocs\drupal-5\modules\formfilter\formfilter.module on line 88.
warning: Invalid argument supplied for foreach() in C:\apache2triad\htdocs\drupal-5\modules\formfilter\formfilter.module on line 88.

And this warning persists after that for the authenticated-user.

2. But when I again-check any field of that form for filtering this warning goes.

-----------------------

There is one more small issue- that is when I filter a content like 'forum' and submit to place it into effect. This 'submit' is also treated as an actual submission of the node, and hence gives me errors for leaving empty the essential fields.

(As for code level details, I do not know much PHP, but will update you once I find something)

Thanks & Regards

#3

zmove - April 28, 2008 - 21:35

Same problem here, when unchecking a fieldset.

#4

plan9 - September 10, 2009 - 13:27

Me too subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.