In the construct for MigrateDestinationEntityAPI (entity_api.inc), $this->id is set to $this->info['entity keys']['name'] if available, or $this->info['entity keys']['id'] otherwise. However, in the import() function, it assumes that the value of this field will be numeric, which it isn't always (e.g. Bean module).

This causes the following message to be output for each item being migrated, even though the migration is successful. It also causes the "destid1" field in the map table to be NULL.

New object was not saved, no error provided

The attached patch changes the conditional from an isset() and a check that the value is greater than 0, to a if (!empty(...)) which fixes the problem for me.

Comments

pvhee’s picture

Confirming that this works, although I could not yet get the updating of existing bean blocks to work. Maybe we need a separate Bean MigrationDestination class?

SebCorbin’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)
SebCorbin’s picture

To migrate beans, see #2141211: Bean Migrate example