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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sfinity’s picture

Assigned: sfinity » Unassigned
twistor’s picture

Component: Feeds Import » Code
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I 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

?

sfinity’s picture

FileSize
3.75 KB
6.1 KB
4.2 KB

Thank 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.

twistor’s picture

I 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"?

sfinity’s picture

sorry, 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.

twistor’s picture

Status: Postponed (maintainer needs more info) » Active
ja09’s picture

I'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!