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.

Comments

joelpittet’s picture

Issue summary: View changes
mikeryan’s picture

Status: Active » Fixed
Issue tags: +Migrate 2.6

Yep, exactly - I've added some code to keep the matching values separate from the value used for creation, thanks.

  • Commit b887d67 on 7.x-2.x by mikeryan:
    Issue #2236279 by mikeryan: Prevent ignore_case from causing created...
joelpittet’s picture

Thank you @mikeryan

derhasi’s picture

Priority: Normal » Major
Status: Fixed » Needs review
StatusFileSize
new873 bytes

The 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.

mikeryan’s picture

Priority: Major » Normal
Status: Needs review » Fixed

Commited, thanks.

  • Commit 0010411 on 7.x-2.x authored by derhasi, committed by mikeryan:
    Issue #2236279 by derhasi: Fix to create_term/ignore_case situation
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.