3

Why would you need to keep the same nid for your migration ? If you use migrate it will map the old nid with the new one, you just need to use the entity_lookup or migration_lookup to process your referenced entities (see https://understanddrupal.com/fr/node/32 for more explanations).


2

I have encountered the same problem and where there may be clashes you can set the value of AUTO_INCREMENT to a high value to ensure there is no overlap between new content items, which get higher node IDs, and old items, which keep their existing ones. For MySQL: ALTER TABLE node AUTO_INCREMENT=100000; ALTER TABLE node_revision AUTO_INCREMENT=100000; ...


2

If you have a field with multiple properties then use an extra array: $values = [ 'name' => $user["name"], 'pass' => '', 'status' => $user["status"], 'mail' => $user["e_mail"], 'field_address' => [ 'first_name' => $user["first_name"], 'last_name' => $user["last_name"], ...


2

The field that you're migrating has multiple values and you're trying to run entity_lookup as though it has only one. I think you just need to make sure you're iterating over the values with the sub_process plugin. Using this issue post as a reference, along with the docs for entity_lookup: field_farbzuordnung: plugin: sub_process source: field_farbe ...


2

You could try using the skip on value plugin. Untested, but probably like: process: status: plugin: skip_on_value method: row not_equals: true value: 1 source: status Should only import published content.


1

The way you're currently doing it doesn't look familiar, with keys and the way the fields are mapped; might just be it's a method I haven't come across though. Either way I've always had success processing CSVs like this: ids: - image_file fields: 0: name: image_file label: Image file That assumes the first column in the CSV contains the unique ...


1

Messing with nids is a tricky business. The Custom Nid module or this question might aid you but technically it's really hard and not advised to alter nids as the column is set to auto increment in the database. There are also a lot of references across the database so changing a nid will probably wreck some things. You could implement a check in the ...


1

Thanks to 4k4 answer I was able to import the data. Here is the code: $adressCountryCode = "NL"; $addressCity = "Amsterdam"; $values = [ 'name' => $user["name"], 'pass' => '', 'status' => $user["status"], 'mail' => $user["e_mail"], 'field_address' => [ 'country_code' => $...


Only top voted, non community-wiki answers of a minimum length are eligible