here's my problem. when i have a cck text filter optional and allow multiple selections, a no-labeled checkbox appears on top of the rest. I guess this checkbox stands for the "All" option. the thing is that it should not appear, just like in the case of a taxonomy filter. i mean, if i use a taxonomy filter, also multiple, also optional, that checkbox doesn't appear, this is how it is supossed to work for all the cases right?
attached are screenshots of both, the taxonomy (working correctly) and the cck text (the other way about) before and after views_checkboxes. Thanks in advance
Comments
Comment #1
meeotch commentedSubscribing to this request. I'm getting the same behavior, and won't be able to use this module until a fix goes in.
Comment #2
meeotch commentedUpdate - I don't have time to figure out how to make this a patch, but here's code that fixes the problem:
Remove the second-to-last "if" clause in views_checkbox.module:
And replace the last "if" clause with this:
Comment #3
jpollard commentedThis fix doesn't seem to be working for me. The extra checkbox is still there. Any other thoughts?
Comment #4
andy inman commentedPlease see this - http://drupal.org/node/242884 - I think it fixes the problem (also new features.)
Comment #5
andy inman commentedNew dev release 4.x fixes this.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
breitner commented?? no-labeled checkbox appears in release 5.x4.x-dev
Comment #8
andy inman commentedAre you absolutely sure you're using the current release? (no old version hanging around somewhere?) I verified the original problem and definitely fixed it, checked on my test and live sites. I'm not syaing it's impossible that there's no outstanding problem, but I can't reproduce it. If you're willing to do more testing, let me know, and we can put a debug version together to find out whats going on.
Comment #9
breitner commentedI use the last dev-version from 2008-Apr-08.
The title of all checkboxes are "Object".
I think there is an error at this point: name="filter0[1]"
Comment #10
breitner commentedsame problem in version 5.x-2.x-dev.
Comment #11
andy inman commentedOk, I won't get a chance to look at this until next week, but then I'll write some debug code in to find out what's causing the problem. In the meantime, could you give me a list of all modules you have enabled - it could be some inter-module compatibility issue. Also, possibly it's language dependent - if you haven't already done so, could you check that it also happens with the site switched to English? Thanks.
Comment #12
andy inman commentedI think this is fixed. See latest CVS version.
Comment #13
andy inman commentedComment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #15
tisho-1 commentedHi there,
I found a bug which is probably introduced in the fix for removing the **ALL** option. The problem is that this option is missing in select list as well as checkbox and radio buttons but it should be present in select lists.
I am relatively new to drupal and patching but here is the fix that worked for me:
old code, line 140:
// Remove the "**ALL**" option if it exists:
if (isset($these_options['**ALL**'])) unset($these_options['**ALL**']);
new code, line 140:
// Remove the "**ALL**" option if it exists but not in select lists:
if (isset($these_options['**ALL**']) && $this_type != 'select') unset($these_options['**ALL**']);
Hope this helps!
Tisho
Comment #16
andy inman commented@Tisho, thanks for the patch. Weird though - it shouldn't get as far as line 140 unless converting the select to radio/checkbox, and looking at the code I can't see how that's happening. What I mean is, I can't see how your patch can achieve anything, since the switch block above makes it impossible(?!) to arrive at line 140 unless $this_type=='checkboxes' || $this_type=='radios'. In all 'continue' in other cases so will loop back to the top:
... so I must be missing something?
Comment #17
tisho-1 commentedSome php weirdness I guess (I come from C# world, so I am kind of reluctant to understand these :-)):
http://php.net/switch
Hope this helps!
Tisho
Comment #18
andy inman commentedAargh! Right, well, that would explain it wouldn't it!?
Thanks for that bit of research. Looks like I need to go back to PHP school! Likewise, I cut my teeth on C (um, and assembler...) So, those continue statements in the switch block all need to be 'continue 2'. Or maybe just replace the switch with an if structure.
I'll fix it in the dev version asap, and try to get a new release out as its obviously a bit broken.
Thanks again.
Comment #19
andy inman commented