Closed (fixed)
Project:
Multiselect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2011 at 11:19 UTC
Updated:
1 Dec 2012 at 14:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
patrick r. commentedComment #2
attheshow commentedI haven't been able to duplicate this. Please post steps to duplicate the problem. Simply submitting the form doesn't produce the bug mentioned above.
Comment #3
patrick r. commentedWell, unfortunately (?) I'm also not able to reproduce this behaviour except under the given circumstances. I have set up a rather complex content content type with lots of fields, fieldgroups and different widget types and when I submit the node form leaving some required fields blank the form shows up again with the usual error messages and the multiselect widget being unstyled and not functional (available options show up in both of the selects). Somehow the necessary css and js is not included in that specific case. I added a multiselect widget to another content type and the problem did not occur here. I guess it's not an obvious bug then if any. ;-) Nevertheless it might still not be a too bad idea to make use of this new #attached property, but I'll leave that up to you.
Comment #4
erlingx commentedThe bug showed up here. I've got a complex content type with different fields/widget types/ckEditor ...
The patch solved the issue :)
Comment #5
esculcar commentedI have same problem always, after save, when some field requiered or some condition is not satisfied.
Comment #6
slashrsm commentedSame thing as mentioned in #5 happens also to me. It can be reproduces if you open new node edit form and hit save immediately. Title is required by default, so it will not pass validation and reload form with broken multiselect widget.
Comment #7
paranojik commentedThe provided patch, apart from a small coding standard non-compliance, is OK. RTBC.
Comment #8
mrharolda commentedI have similar, but very different issue with form validation and multi_select: when submitting an existing node with a 'required field error', the multiselects will have their old values instead of the new values set with the edit.
Can anyone confirm this?
I tried the patch, but it doesn't fix this issue.
Comment #9
Babymaggie commentedHi guy's - Love the idea of this widget but Im suffering the same problem.
If you create a taxonomy field and then mark the field (let's say categories) as required, - If you then go to save your content without selecting a category then you will get the failure - I've tried both versions (dev and approved) for D7 and I'm getting the same problem.
I have attempted the patch, but not knowing what's going on I can't seem to get it to work.
Could someone kindly upload the file for me with the patch applied for me to try?
Many thanks
Comment #10
magnusk commentedI've encountered the same problem and agree that this is the right solution. (I've had similar issues when using drupal_add_css in custom D7 forms.)
Here is a proposed revision of the patch, more in line with the coding standard?
Comment #11
magnusk commentedComment #12
paranojik commentedThis patch is ready.
Comment #13
stijn.vanden.brande commentedI encountered the same problem and tested the patch.
Patch works fine, RTBC.
Thanks
Comment #14
jvandooren commentedSame problem, used patch from #10 and problem fixed...
Comment #15
johnvI confirm that the patch solves the problem.
Comment #16
johnvIMO this patch is not complete until the issue from #6, #8 is resolved:
- Add/edit a node, where field 1 (or even Title) is required, and field 2 has the multiselect widget.
- clear field 1
- change the value(s) from field 2
- submit the form; the page is regenerated with an error "field is required."
- check field 2: it has the original values - this is not the case when using e.g. checkboxes
Comment #17
magnusk commentedJohn, the loss of previously entered data is a separate issue. If there isn't one open (I mentioned one aspect of the problem in #1321664: User & node references don't load when editing an existing node), you should create one. This particular issue is about the wrong approach to attaching CSS/JS to the widget in the node form, and the patch fixes it.
Comment #18
rbishop commentedthank you ! patch #10 worked perfectly for me (drupal 7.14/multiselect 7.x-1.9)
Comment #19
BeaPower commentedwhen will this be committed?
Comment #20
pierrepaul commentedTested patch in #10 and worked perfectly. Thanks!
Comment #21
alexweber commentedThanks all for the great work! This has been committed in 8eef5b6.