Hi,
consider importing countries in different langauges and creating terms in the same vocabulary:
ID,Name,Language
1,SEYCHELLES,fr
2,SEYCHELLES,en

for the same vocabulary, when importing 2 terms with the same name but in different langauges, findMatchingTerm finds that the second term is a duplicate of the first one, and the migration ends by updating the second term insted of creating a new one

This happens because findMatchingTerm does an taxonomy_term_load_multiple with criterias on the term name and vocabulary id only.
We need to have the language criteria too to allow migrating terms that have the same name in different languages into the same vocabulary.

i will suggest a patch for this

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

izus’s picture

izus’s picture

Status: Active » Needs review

Status: Needs review » Needs work
mikeryan’s picture

+++ b/plugins/destinations/term.inc
@@ -292,7 +292,7 @@ class MigrateDestinationTerm extends MigrateDestinationEntity {
+      array('name' => trim($term->name), 'vid' => $term->vid, 'language' => $term->language));

There should be a check that $term->language is set.

izus’s picture

Thanks for the review.
Here is a patch to test term language :)

Status: Needs review » Needs work
temkin’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: migrate-findMatchingTermfindMatchingTerm_language_criteria-2459435-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.