Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When importing into a field of widget type "Select or other (radio button type)" ,
the value is always saved as "Other | plain_text" even if the value matches a predefined value in the select list.
Comment | File | Size | Author |
---|---|---|---|
#7 | Screen shot 2012-10-01 at 1.46.09 PM.png | 15.04 KB | ja09 |
#7 | Screen shot 2012-10-01 at 1.46.16 PM.png | 14.12 KB | ja09 |
#3 | cck setting 1.png | 4.2 KB | sfinity |
#3 | Edit 1.png | 6.1 KB | sfinity |
#3 | Checkbox Edit.png | 3.75 KB | sfinity |
Comments
Comment #1
sfinity CreditAttribution: sfinity commentedComment #2
twistor CreditAttribution: twistor commentedI just tested this with radios and select list and it worked fine. What does it say in your allowed values for the field?
thing1|thing1
thing2|thing2
or
0|thing1
1|thing2
?
Comment #3
sfinity CreditAttribution: sfinity commentedThank you for your reply.
My allowed values for the field is the following.
(radio button type is NG → cck setting 1.png and Edit 1.png)
(values is japanese is same)
↓ NG
Always|Always
Rarely|Rarely
Irregular|Irregular
↓ NG
0|Always
1|Rarely
2|Irregular
(check boxes type is OK → Checkbox Edit.png)
↑ Sorry, japanese. but The same meaning.
Comment #4
twistor CreditAttribution: twistor commentedI don't quite understand, what does NG mean?
Feeds maps directly to the field value, in this case, that's the value in the first part. In Always|Always, it would be 'Always' and in 0|Always, the value in the feed would need to be 0.
Feeds Tamper can be used to convert the value from Always -> 0.
Are you saying that the value is always set to "plain_text"?
Comment #5
sfinity CreditAttribution: sfinity commentedsorry, NG mean "does NOT work"
Yes, the value is always set to "plain_text" - select or other (radio button type)
so, i will explain my environment.
1.input xml text format
<test>Always</test>
2.i use Xpathparser.
3.node setting (target mapping field setting)
-select or other field (radio button type)
-available values setting
Always|Always :radio button type - does NOT work, but: checkbox type - does work
Rarely|Rarely :radio button type - does NOT work, but: checkbox type - does work
Irregular|Irregular :radio button type - does NOT work, but: checkbox type - does work
-other field is not set default value.
4.importing node result.
-other field selected and value is always "plain_text". :radio button type. - does NOT work.
But,
-"Always" checked. :checkbox type. - does work.
Comment #6
twistor CreditAttribution: twistor commentedComment #7
ja09 CreditAttribution: ja09 commentedI'm having the same issue. Importing a .csv, select_or_other always imports as "Other" > "plain_text"
I've also tested using the standard Drupal select widget and everything works fine. (screenshots attached)
Any suggestions?
---
edit: Importing select_or_other .csv tables show as "Other" > "plain_text" when editing the node, but show the correct data when viewing the node. This is strange and it could work for viewers, but it will not work for administrative purposes of the site.
If anyone has some more knowledge of the bug it would be greatly appreciated. Thanks!