Thanks for writing this module, it's a great idea!
I've installed this and activated it for the site.
However, when I look at my view that has an exposed filter, instead of the dropdown list that was there before, I now see, for each option (i.e., 7 times in a row; the content type filter has 7 options):
warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/views_checkboxes/views_checkboxes.module on line 83.
I've looked at that line in the file but I don't know enough PHP to figure this out :(
Thanks
m.
Comments
Comment #1
scottrigbyfor me, the checkboxes look great (because I enabled multiple select).
BUT I am also getting the same warning:
ps, minor edit of this comment (removed specifics from path)
Comment #2
Anonymous (not verified) commented+1 Same error here.
txcrew
Comment #3
nschelly commentedI don't suppose any of you can send me a screenshot? Also, what type of filter is it? I'm using this to filter on taxonomy terms, but perhaps a different type of filter is causing the problems you're having?
-Neil
Comment #4
mpromber commentedI've tried using it to filter on node types.
I'll try to send a screenshot later; have it disabled and made some other changes to the view right now.
Thanks,
m.
p.s. minor typo edited.
Comment #5
Anonymous (not verified) commentedAttached you will find a screenshot of the error. I just exposed a filter on the default taxonomy term view.
thanks,
txcrew
Comment #6
raymondllee commentedsame error here, i'm exposing a taxonomy vocabulary with 3 choices when I get this error in a gmap view. i dumped the variables at this point, and I wonder if it's because the first option_id is a string "**ALL**" instead of an integer?
string
- ioption_id
**ALL**
integer
- icount
1
integer
- ioption_id
0
integer
- icount
1
integer
- ioption_id
1
integer
- icount
1
integer
- ioption_id
2
integer
- icount
1
Comment #7
raymondllee commentedI got this working by borrowing some code from the formtweaker issue thread. Here's my diff file.
Comment #8
scottrigbyre: #7
this diff hasn't worked for me. Here's my error attached:
Comment #9
nschelly commentedI'm sorry I haven't been back to this thread... I promise I will get working on a fix. I wonder if this actually related to the "**ALL**" option, as raymondlee suggest. I didn't use them or test them, but I can imagine this code interfering with that. That doesn't seem to be all of it, but I'll investigate more in the coming week I hope.
-Neil
Comment #10
scottrigbyre #8 -- oops!
You'll want to ignore that error in #8 - it was my fault - I had deleted a field that was being called by my location map view.
Comment #11
scottrigby@ raymondllee -- your diff.txt in #7 works for me after all -- thanks!
Comment #12
mrf commentedSame error message, and the patch worked perfectly for me.
Comment #13
scottrigbySo raymondllee's diff (#7) needs to be made into a patch, right? I'm still new with all this, but that's the next step, isn't it (I'd do it if I knew how - still not there yet).
Then the patch would be committed if all testing seems ok (cause testing is already underway, and works so far)?
SCott
Comment #14
zmove commentedI have the same errors before patch, I have a very long list of :
But the difference I have is that the exposed filters don't appears.
After patch, it don't work too, I have an error too :
The error just change place because I put some code before, so the patch resolve nothing for me...
I have 6 exposed filters with multi select enabled. The exposed filters are content taxonomy fields, maybe it is not compatible...
Comment #15
nschelly commentedI'm renaming this issue to make it more appropriate to what I think the cause was. It seems those who've experienced the problem all the the **ALL** option in their exposed filters. I've now (based on raymondlee's patch) incorporated made the module skip those options and hide them, as his did. I also cleaned up the logic a lot in that section of the code, since it was really not clear even to me.
I hope everyone who was trying out his patch or still is having issues will try out the new dev version I released and let me know if it fixes your problems. Also, if anyone was getting this error but did not have **ALL** in their option list, please let me know (preferably in a new issue) so that we can investigate that as a separate bug.
Thanks...
-N
Comment #16
nschelly commentedComment #17
nschelly commentedComment #18
planctus commentedI'm sorry i had to open this issue again, but i'm still having problems showed by drupal in line 83 in views_checkboxes.module file, and i see a great amount of that.
But worst... i've lost the selection box too, i see only the filter option (where it had not supposed to be) but not the items.
I'm using an exposed filter for a cck field with multiple values.
Without this module it works and i see the selecion box with the items i expected to see.
Activating the module the box disappear and i see an illogical field to choose from "one of them" and "none of them" and it makes non sense to me, cause it had to be a choice between a list or, better, between a checkbox list.
Thank you
Da.
Comment #19
nschelly commentedplanctus,
Can you attach a screenshot of the form? Also, please attach an export of your view. I'll use that to recreate your issue.
-Neil
Comment #20
ckngI'm still facing same problem with 5.x-1.2 & 5.x-dev, the initial patch in this thread actually solves the line 83 problem.
There is another problem on line 88 as seen by zmove, due to below.
Apparently there is a "- Please choose -" in the options for some (possible bug in View?), see the dump
The attached patch skip if the option is not an array (as in the case for "- Please choose -").
Additional minor stuffs on the patch:
- remove ending
?>- shorten the code on option
Please test it out if it works for your case. So far it solves all the errors I had.
Comment #21
planctus commentedi'm sorry but i disabled checkboxes in the meantime... i can't show you a screenshot, but i will try to help you doing this again,
just, i don't have time now, i'll do as soon as i can.
Thanks,
Da.
Comment #22
nschelly commentedplanctus,
Does the patch ckng just submitted repair your issues?
-Neil
Comment #23
nschelly commentedI just posted a new release, 1.3 that I suspect will repair the issue you're reporting. It was seperately reported here: http://drupal.org/node/215935 and it came from having view filters that were not based on taxonomy terms. As such the options weren't represented by arrays of objects (as with terms). They were arrays of strings and didn't need rewriting as a result.
I think the new release will fix that - it has in my testing at least.
-N
Comment #24
planctus commentedI'll give it a try...
we're in production now,
come to see us at http://inkscapegallery.net
I've two test environments, i'll try the patch and then i'll report.
I'm sorry for the delay, i was really busy working on the inkscape gallery release.
Thank you
Da.
Comment #25
planctus commentedit seems to work with the new release!
I just have a strange layout but i think it is my css related...not your fault :-)
But the checkboxes are there and everything seems to be fine.
Da.
Comment #26
nschelly commentedI'm closing this again. I think this is resolved. Please open a new ticket if you have continued problems or check open ticket if you have a problem that resembles the discussion here. It seems that a few vaguely related issues have combined here, making it more confusing for me to follow exactly who has what problem.
-N