Error for Dom Migration Lookup with multiple source ids

Created on 14 October 2021, almost 4 years ago
Updated 8 July 2025, 26 days ago

Problem/Motivation

When using the dom_migration_lookup migrate process plugin with a migration having multiple source ids, there is an error:
TypeError: str_replace(): Argument #2 ($replace) must be of type string when argument #1 ($search) is a string in str_replace() (line 178 of migrate_plus/src/Plugin/migrate/process/DomMigrationLookup.php)

Steps to reproduce

* Create a migration with multiple source ids (like node translations)
* Use it in dom_migration_lookup

Proposed resolution

Add an option to the migrations configuration

Remaining tasks

* Tests?

API changes

New option in migrations key configuration of the plugin: sourceid

🐛 Bug report
Status

Needs review

Version

5.0

Component

Plugins

Created by

🇫🇷France SylvainM

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024