
So when creating new terms:
$this->addFieldMapping('field_collections', 'collections');
$this->addFieldMapping('field_collections:ignore_case')->defaultValue(TRUE);
$this->addFieldMapping('field_collections:create_term')->defaultValue(TRUE);
Produced a new term for "Cars" and "cars" when I assigned "Cars" to the $row->collections in prepareRow() during a CSV import.
Turning off ignore_case fixed the issue. Likely it's normalizing to find the result but using the normalized value also for setting the term name.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2236279-5-migrate_create_term_ignore_case.patch | 873 bytes | derhasi |
Comments
Comment #1
joelpittetComment #2
mikeryanYep, exactly - I've added some code to keep the matching values separate from the value used for creation, thanks.
Comment #4
joelpittetThank you @mikeryan
Comment #5
derhasi commentedThe latest changes break the create_term + ignore_case functionality, as tids of the "lower values" will never be assigned/returned. The attached patch solves this.
Comment #6
mikeryanCommited, thanks.