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.

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

StatusFileSize
new3.75 KB
new6.1 KB
new4.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
jeff.a’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!

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.

If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.

If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.