Rolling back a skipped row (using --sync) results in: [warning] array_flip(): Can only flip string and integer values! EntityStorageBase.php:312

Created on 26 January 2022, over 2 years ago
Updated 20 March 2024, 6 months ago

Problem/Motivation

I have a migration where certain rows are skipped. The migration is run with the --sync option so that rows which are removed from the source, get removed from the destination.

When a row which was skipped on import, gets removed from the source, the "drush migrate:import --sync" command throws a warning:
[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:312

Steps to reproduce

Install attached demo module.
Move the users.csv file to your /tmp/ directory.
Run: drush migrate:import --sync user_rollback_skipped_demo
Remove the last line from /tmp/users.csv (the one that got skipped).
Run again: drush migrate:import --sync user_rollback_skipped_demo

🐛 Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

🇧🇪Belgium Erwin De Vylder

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