The module (1.3) seems to work, but I get this error:

warning: "Invalid argument supplied for foreach() in /modules/views_checkboxes/views_checkboxes.module on line 89."

Comments

pinow’s picture

This only seems to happen when I expose a taxonomy-filter specific(!) for a vocabulary.

"Taxonomy: Terms For Vocab1"

pinow’s picture

I used the following piece of code from http://drupal.org/node/215935#comment-712436 to fix it:
if (is_object($form['filter'.$count]['#options'][$option_id])) {
foreach ($form['filter'.$count]['#options'][$option_id]->option as $num => $val) {
$newoptions[$num] = $val;
}
} else {
$newoptions[$option_id] = $option;
}

But then I had the "- Please choose -" option visible. So I added the following beneath the line where you disable ***ALL***:
if ($option_id === '') continue;

nschelly’s picture

Assigned: Unassigned » nschelly

I can't seem to recreate this - I can't figure out how to make a taxonomy selection show a "- 'Please choose -" listing. Can you send me an export of your view so I can see exactly how you have it configured?

I think you're saying that doing this fixes it by hiding the "- Please choose -" option. Is that correct?
> But then I had the "- Please choose -" option visible. So I added the following beneath the line where you disable ***ALL***:
> if ($option_id === '') continue;

-N

pinow’s picture

No, I fixed it by using this piece of code:
if (is_object($form['filter'.$count]['#options'][$option_id])) {
foreach ($form['filter'.$count]['#options'][$option_id]->option as $num => $val) {
$newoptions[$num] = $val;
}
} else {
$newoptions[$option_id] = $option;
}

But then the first checkbox-option was "- please choose -".

And I fixed that by adding this:
if ($option_id === '') continue;

nschelly’s picture

Status: Active » Closed (fixed)

I just posted a new release with your bug fix. I don't see how it can harm things, but I couldn't confirm that it works or not because you didn't send what I asked for to recreate the problem.

It's version 3.1 - please read the release notes as a few changes have occurred.
-N