Hi All,
Similar to https://drupal.org/node/1425694 but for D7 and none of the suggestions in that thread solved the issue for me.
I am using Drupal 7.22, Feeds 7.x-2.x-dev and Feeds Tamper 7.x-1.x-dev.
I have a site where I need to import CSV files through feeds that have three fields containing taxonomy terms. The terms are separated by a ; in the CSV file. I have also tried pipes and commas, and enclosing field values in quotation marks, all to no avail - only the first term is ever picked up.
In the associated content type, the taxonomy term fields are all set to unlimited values. If I manually create a node and assign it multiple taxonomy terms, it works as expected.
Something strange did happen once, in that two of the three fields would be populated by the right terms if I selected "Auto create" in the mappings, but it was actually creating duplicate terms - i.e. if I imported 10 items with the term "orange", I ended up with 10 taxonomy terms of "orange."
Any help/suggestions would be most appreciated!
Comments
Comment #1
doubleedesign CreditAttribution: doubleedesign commentedSorry, wrong similar issue link. https://drupal.org/node/992420
Comment #2
chrowe CreditAttribution: chrowe commentedI seem to be having the same issue with "Auto create" enabled.
Each new import creates a new term with the same name. i.e.
"Counseling & Therapy" -> counseling-therapy
"Counseling & Therapy" -> counseling-therapy-0
"Counseling & Therapy" -> counseling-therapy-1
drupal-7.22
feeds-7.x-2.0-alpha8
feeds_tamper-7.x-1.0-beta4
Comment #3
chrowe CreditAttribution: chrowe commentedThe fix that seems to have worked for us is to eliminate any blank spaces between the term and the term separator
i.e we had "term1; term2" and needed to make it "term1;term2"
We did this by using the Feeds Tamper trim option to trim both leading and tailing spaces after the explode tamper.
The reason for this is that feeds was looking for the term " term2" with a space but then Drupal was creating a new term without a space, so it never found the ones it had created before since the space was trimmed by Drupal.
Comment #4
doubleedesign CreditAttribution: doubleedesign commentedThank you so much for posting this chrowe, it solved my issue!
Comment #5
filmninja CreditAttribution: filmninja commentedHuzzah! Thanks chrowe! That did the trick.
Comment #6
twistor CreditAttribution: twistor commentedComment #8
amacias CreditAttribution: amacias commentedHi chrowe,
How exactly you do that?
I have feeds tamper to explode a list of taxonomy terms. After exploding them I don't have a string any longer, but an array, so if I add a trim filter after the explode one, I get the following error:
How can you trim the individual taxonomy terms after exploding them?
Thanks a lot
Andrés
Comment #9
junedkazi CreditAttribution: junedkazi commentedComment #10
nmillin CreditAttribution: nmillin commentedHi amacias,
I ran into this same issue and found a workaround. I was using Feeds Tamper 7.x-1.0-beta3+55-dev and I upgraded to 7.x-1.0-beta-5. The upgrade caused the same warning that you reported.
What I was doing:
Workaround:
An example of the terms I'm importing is; "Term 1; Term 2; Term 3". What Drupal likes, is "Term 1;Term 2;Term 3" so duplicate terms aren't created (ex: counseling-therapy, counseling-therapy-0 doesn't happen). If you are exploding something other than a ";", you could tweak this tamper to have it work for you.
I'm not sure why trim doesn't work anymore **shrug**
Comment #11
b33tl3 CreditAttribution: b33tl3 commentedI've got a similar issue.
I'm extracting taxonomy term from a xml attribute.
ex :
So I have 1 tamper plugin which is :
- Find replace REGEX
- REGEX to find : /term="(.+?)"/
- Replacement pattern : $1
And a mapping "Search taxonomy terms by Term name" with "auto create" on.
So I had duplicate entries "myTerm1" in my vocabulary. :(
The trim workaround saves me :) ... even if there is no reason I should use it.
thanks folks :D
Feeds : 7.x-2.0-alpha8
Feeds Tamper : 7.x-1.0-beta5
Feeds XPath Parser : 7.x-1.0-beta4
Comment #12
Mark_L6n CreditAttribution: Mark_L6n commentedAs an FYI, it appears that a taxonomy term that does not already exist in the Drupal installation will not be imported by Feeds Tamper. Took a lot of experimentation for me to figure out the cause of an import error, leaving a note to help others.
Comment #13
twistor CreditAttribution: twistor commentedWhether a tag is created on import is a Feeds setting. It has nothing to do with Feeds Tamper.
Comment #14
Mark_L6n CreditAttribution: Mark_L6n commentedThank you for the pointer, twistor.
The Feeds setting is in the 'Node Processor' 'mapping' display; in the Tags field, click the cog button in the 'target configuration' column, and check the 'Auto create' box to enable nodes to be created.
Comment #15
twistor CreditAttribution: twistor commentedComment #17
Ameer Khan CreditAttribution: Ameer Khan commentedits working while removing space after comma. From ", " to "," in CSV file. after changing there were no duplicates.