Drupal Answers Asked by Alexandre on October 26, 2021
I would like to migrate node entity references from D7 to D8. In my D7 application, many nodes are related to other with the "entity reference" system. But related nodes could belong to many node types like "article", "page", "news", and so on.
I tried to use "entity_lookup" plugin, but this does not work (SQL error):
field_related_content:
plugin: sub_process
source: field_related_content
process:
target_id:
plugin: entity_lookup
no_stub: true
entity_type: node
bundle_key: type
bundle:
- presse
- news
- page
value_key: nid
SQL Error is:
In Connection.php line 701:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT base_table.vid AS vid, base_table.nid AS nid
FROM
{node} base_table
INNER JOIN {node_field_data} node_field_data ON node_field_data.nid = base_table.nid
WHERE (node_field_data.nid = :db_condition_placeholder_0) AND (node_field_data.type = :db_condition_placeholder_1:db_condition_placeholder_2:db_condition_placeholder_3); Array
(
[:db_condition_placeholder_0] =>
[:db_condition_placeholder_1] => presse
[:db_condition_placeholder_2] => news
[:db_condition_placeholder_3] => page
)
Someone has an idea?
Many thanks!
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP