Problem/Motivation
Using multi-select widget with user-reference field. List of users presented in "Available Options" column is generated by a view. Configured in structure > content type > my_content_type > manage fields > my_multiselect_field > field settings > views - users that can be referenced
(no filtering based on user roles that can be referenced or user statuses that can be referenced)
Selecting multiple users works fine.
Selections are displayed properly in the right column of "Selected Options" until the node is saved.
Once the node is saved the field data from the view is replaced with (what appears to be HTML).
- The list of users matching the criteria of the view appear fine in the left column of "Available Options." (see image 1 attached)
- Able to select users from list and move them to the "Selected Options" column fine. (see image 2 attached)
- Saving node writes to the database fine and displays on the node properly
- Editing saved nodes fails to display the fielded data but instead appears to display HTML (see image 3 attached)
Comment | File | Size | Author |
---|---|---|---|
#6 | multiselect_tags_and_languages-1971100-6.patch | 6.85 KB | anou |
#4 | multiselect_tags_and_languages-1971100-4.patch | 1.94 KB | anou |
#1 | multiselect_tags_and_languages-1971100-1.patch | 2.37 KB | anou |
3 editing saved node with display error.png | 46.98 KB | knowledges33ker | |
2 presenters selected.png | 46.63 KB | knowledges33ker |
Comments
Comment #1
anouHello,
I post my patch here because your problem was also mine but with entity reference generated by views. My patch also resolve an
Notice : Undefined index: nid
and makes multiselect language aware.Try it and tell me if everything all right.
Comment #2
anouI changed the title a bit and the module version. Feel free to modify it again if I'm wrong.
Comment #3
JvE CreditAttribution: JvE commentedDo not add code clutter for no reason please.
What is the issue with views displays? Does this still allow me to have options like "<Yes>" and "<No>"?
Trailing whitespace.
Good one, but is $element['#language'] guaranteed by spec to be always set?
I am currently trying out jquery_ui_multiselect so I'm not able to do much testing on this one.
Comment #4
anouThank you for your report.
<tags />
issue with views, I had to do some "if" statement with the $handler... I removed it.Here's my patch modified.
Comment #5
robby.griffin CreditAttribution: robby.griffin commentedThanks for making these patches, anou! It is incredibly helpful for me. I just applied your patches, which made me realize one big issue for anyone trying to test your patch, you rolled your newest patch against your customized version of the module rather than the dev version of the module. In order to make this work, I had to apply the first patch, and then apply the second patch. Could you re-roll the patch so that testers can just use the most recent one? I'll be testing this in the coming weeks some more to see how it holds up.
Comment #6
anouHello Robby,
here's a new patch with all my modifications in one place. I think it's ok... please let me know if it's what you want it. Thanks.
Comment #7
NWOM CreditAttribution: NWOM commentedI had the nid issue. The patch works perfectly. Thanks!
Comment #8
nfriend CreditAttribution: nfriend commentedThe Patch in #6 worked for me as well. Just be sure you apply it to DEV version. Might be ready for a new version??
Thanks for this module.
Neil
Comment #9
attheshow CreditAttribution: attheshow commentedI just added this to the development version.
Comment #10
attheshow CreditAttribution: attheshow commented