When an import file (csv) has two columns with the same name, only the values of the last column is imported. Feeds build and associative array per row, with the header name as key. This is the reason it fails when there are several columns with the same name. I've written a small patch that appends a counter number after the name if there are more than one row.

Source:

name = John
name = Johnny
surname = Doe

Destination before the patch:

name = Johnny
surname = Doe

Destination after the patch:

name = John
name2 = Johnny
surname = Doe

CommentFileSizeAuthor
#2 imports_fail_with-2590097-2.patch1.23 KBBarisW

Comments

BarisW created an issue. See original summary.

BarisW’s picture

StatusFileSize
new1.23 KB

Status: Needs review » Needs work

The last submitted patch, 2: imports_fail_with-2590097-2.patch, failed testing.

bluegeek9’s picture

Status: Needs work » 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.