Hi,
In the middle of a successful field collection migration, I suddenly started to get the topic's error message for each field collection.
After troubleshooting, the $ids variable is indeed "false" after the row
$ids = $this->destination->import($this->destinationValues, $this->sourceValues);.
However, when i print the $this->destinationValues and $this->sourceValues objects, they seem to be ok with all their mapped fields and id's. The field collection's hostEntityId exists in the database source migration table, and is mapped in the migration class. This whole migration worked great for thousands of field collections, before starting to give me only this error for them. The same thing applies for three different types of field collection migration classes, all of which worked until now.
I know this information is very limited, but so is the error message and I don't really know what else to give. What could cause the previous code row to return false, and how could I troubleshoot it further?
Comments
Comment #1
mnordstrom commentedGot this figured out!
The problem was, that I was using the Taxonomy manager & Term merge modules in between, to delete and merge taxonomy terms in my imported articles, which the field collections were being attached to.
These beta stage module(s) deleted terms from the taxonomy_term_data table, but not the tables which had taxonomy term references... which caused the nodes to have term references to terms, which didn't exist, and this in turn apparently made it impossible to attach field collections to these nodes.
The problem got fixed by deleting these term reference rows manually from the database.
Phew... Still, I wish the error message had been more informative, I guess it was a question of not being able to validate the field collection's host entity node while trying to save it or something?
Comment #2
stece commentedHaving a simular issue when importing a fieldcollection. However I'm not doing any taxonomy magic during migration.
Quite hard to figure this error out.
If you have any tips in a direction on finding the cause. Would be helpfull :)