Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2013 at 11:42 UTC
Updated:
18 Feb 2014 at 05:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mstiThis patch fixes the problem described above.
Comment #2
megachrizIt took me a few seconds before I understood what you meant with 'download template'.
Here are the steps to reproduce the error:
To reproduce the issue:
Actual result:
Expected result:
Comment #3
megachrizI can confirm the patch in #1 fixes the bug: after applying the patch, I get each column only once in the template.
The patch has some minor coding style issues though: after a comma should come a space:
+ elseif (!in_array(check_plain($mapping['source']),$sources) && !in_array(check_plain($mapping['source']),$uniques)){No space before$sources,$uniquesand{+ elseif (!in_array(check_plain($mapping['source']), $sources) && !in_array(check_plain($mapping['source']), $uniques)) {Spaces includedAlso, I think it makes the code more readable if the check for existing columns is done once. The attached patch first does a check for existing columns before deciding whether the column should be added to
$uniquesor$sources.Comment #4
mstiThis patch fixes an related:
Just above the 'Download a template' link, there is a list of the fields that show in the csv file. This list also contains duplicates.
This patch removes the duplicates.
Comment #5
megachrizMarked #1838868: Duplicate fields in page message and in sample template as a duplicate.
Comment #6
twistor commentedhttp://drupalcode.org/project/feeds.git/commit/a7136bc