first option of cck select list not showing up
ipwa - July 1, 2008 - 16:34
| Project: | Better Select |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I really like this module, thanks for working on this. One problem that I'm having though is that it doesn't show the first option in select lists made with cck select list widget. This happened to me on views exposed filters, and also when editing the view. Hope this can be fixed, this is much needed in Drupal it improves usability a lot.

#1
You didn't provide any details about the exact nature of the problem you're experiencing, but I suspect the views module is the culprit.
http://drupal.org/node/142347
The patch provided in comment #39 worked for me, although the thread identifies a fundamental flaw in views of which the aforementioned patch merely fixes a symptom thereof.
#2
I have the same issue (not related to views). When I enable "better select" I get the problem when adding a cck date field: the granularity options normally show year, month, day, ... With better select the year option is not there anymore.
HnLn
#3
Had a quick look at the code and it seems this is the problem:
if (!$element['#required']) {
array_shift($element['#options']);
}
(line 27-29 in betterselect.module)
I guess the if statement needs to be expanded and check if the first value of options is an empty value indeed.
Tnx,
HnLn
#4
I fixed my local copy be modifying the code this way:
if (!$element['#required'] && !key($element['#options'])) {
array_shift($element['#options']);
}
(line 27-29 in betterselect.module)
HnLn
#5
fix committed. should be available in dev release later today
#6
whoops... not fixed yet
#7
fixed in cvs. should be in dev release in half a day
#8
Automatically closed -- issue fixed for two weeks with no activity.
#9
If you STILL find yourself after trying this patch with an enpty labeled value at the top, it's probably because you used the same patch as i did (which I can't seem to find...) to change the "None" value into an
<All>value.if you look in the source, you will see a stupid
<all _moz-userdefined=""/>where the label<All>should of been.I had no idea where this text is comming from, so I just used the string overrides module to change it into [All] ...
Now all is well ;)