Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Creating a new issue based on the discussions here: http://drupal.org/node/840626#comment-3228792
Note that I actually have two separate values ('phone 1' and 'phone 2') that I want to put together into one multi-valued field.
Looking at content_feeds_set_target() in mappers/content.inc, it seems this is not supported...
Is this the case?
Comment | File | Size | Author |
---|---|---|---|
#6 | 873198-6_merge_tags.patch | 773 bytes | alex_b |
#4 | 873198-3-feeds-multisource-taxonomy.patch | 650 bytes | Anonymous (not verified) |
#1 | feeds-873198-1.patch | 645 bytes | BWPanda |
Comments
Comment #1
BWPanda CreditAttribution: BWPanda commentedI worked out why this wasn't working - it's a bug.
The attached patch fixes it by merging the existing value (if any) with the new value(s). It was previously ignoring the existing value and overwriting it.
Let me know if this patch fixes it for you too.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedWould the same thing apply for taxonomy.inc?
For example, using a free tagging - multitag 'Categories' vocabulary:
Source -> Target:
------------------
Category Level 1 -> Categories
Category Level 2 -> Categories
Category Level 3 -> Categories
The result is, only Level 3 is stored in Categories, 1 & 2 are lost.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedIn mappers/taxonomy inc, I think this is the solution, change:
to this:
I still need to test this.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI tested the patches (mine attached now), and they really work.
My patch is for 6x10-beta4, but it should apply to latest dev.
If the maintainers feel they should be part of feeds, please include them.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedOn a side not, my patch might need array_unique to reduce duplicates,
$terms = array_unique(array_merge($terms, explode(',', $node->taxonomy['tags'][$vocab->vid]));
Unless Drupal does this anyway.
Comment #6
alex_b CreditAttribution: alex_b commentedarray_unique is not necessary as taxonomy uses drupal_explode_tags() to split tags - which in turn uses array_unique. We should be using drupal_explode_tags(), too btw.
Comment #7
alex_b CreditAttribution: alex_b commentedCommitted, thank you.
http://drupal.org/cvs?commit=416046