When I try to change the order of rules in a custom filter, I receive this error message:

warning: Invalid argument supplied for foreach() in /path_to_my_site/sites/all/modules/customfilter/customfilter.admin.inc on line 378.

...and the changed order is not saved.

I use Drupal 6.14 on PHP 5.2.6-3ubuntu4.2.

CommentFileSizeAuthor
#1 Voila_Capture_53.jpg49.87 KBavpaderno

Comments

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new49.87 KB

I cannot reproduce this. I am testing it on the last development snapshot of Drupal 6 (which shows also the notice messages), but I don't get any error when I change the order of the rules. It is true that I am using PHP 5.3.0, but I don't think it changed something about that.

avpaderno’s picture

Also, are you sure you reported the correct version? In version 6.x-2.0-beta7, the FOREACH-statement is at line 384.

avpaderno’s picture

Version: 6.x-2.0-beta7 » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Fixed

I was able to reproduce the error, and I have changed the code.

Thanks for your report.

rzelnik’s picture

That's great! Thanks for quick response. :)

avpaderno’s picture

I will create a new official release once that I resolved #628532: Allow multiple descriptions - one for each language enabled on Drupal.

If you are not comfortable to use a development snapshot, I can tell you how you need to change the code.

Status: Fixed » Closed (fixed)

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

rzelnik’s picture

Status: Closed (fixed) » Active

Could you please publish the change in the code? I have tried a development snapshot, but the database update was unsuccessfull - there are some typos:

An error occurred. http://..my site path.../update.php?id=8&op=do
Fatal error: Call to undefined function db_query_raange() in /...my site path.../sites/all/modules/customfilter/customfilter.install on line 279

I have fixed db_query_raange() to db_query_range(), but then some new failures appeared:

Failed: ALTER TABLE {customfilter_filters} DROP shorttip
- it's {customfilter_filter}

Failed: ALTER TABLE {customfilter_rules} ADD INDEX customfilter_rule_prid (prid)
- it's {customfilter_rule}

iswilson’s picture

In the _customfilter_rules_tree_form function in customfilter.admin.inc, delete the "$form = array();" line (it is line 847 in 6.x-2.0-beta7)

rzelnik’s picture

Yes, it works now, thanks!

avpaderno’s picture

Status: Active » Fixed

I am marking this report as fixed; the last comments report a different issue, which should have its own report.

Status: Fixed » Closed (fixed)

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