I'm using the taxonomy submodule to create variations around taxonomy terms. This is all working fine apart from an annoying error message that comes up on the 'Bulk Add Products' page.

Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value() (line 2251 of /includes/form.inc).

It seems to be the same error as described here and fixed here.

Did the fix go into 7.x-1.0-rc5?

Thanks

Comments

sven.lauer’s picture

Both fixes you reference went into rc5, yes. So there may be an additional issue.

What widgets are the taxonomy fields using?

msmithcti’s picture

Hi Sven,

I'm not sure how easy this is going to be to debug because the site has been in development for a while and I couldn't give you any steps to reproduce the error. I've also not been able to narrow the circumstances where it's happening down, other than it happens whenever I'm adding using taxonomy to create combinations.

The taxonomy widgets I'm using are all checkboxes/radios.

Let me know if I can give you any more information.

marktheshark’s picture

Still there in rc6 for me.

CaptainPinkey’s picture

A little late but i found a solution, maybe a bit dirty but it works!
The form.inc need to be edited:
On line 2288 change:

foreach ($element['#default_value'] as $key) {
      $value[$key] = $key;
}

To this:

if (is_array($element['#default_value'])){
    foreach ($element['#default_value'] as $key) {
        $value[$key] = $key;
    }
}
else 
{
    $value[$element['#default_value']] = $element['#default_value'];
}