MigrateBatchExecutable ignores custom message interface in batch operations

Created on 18 August 2025, about 1 month ago

Problem/Motivation

MigrateBatchExecutable hardcodes new MigrateMessage() in batchProcessImport(), ignoring custom message interfaces passed to the constructor. This prevents modules like migrate_source_ui from displaying migration messages in the UI, as messages are only logged to watchdog instead of being shown to users.

Steps to reproduce

1. Create a migration with custom MigrateMessageInterface (e.g., one that displays messages via Drupal messenger)
2. Use MigrateBatchExecutable with the custom message interface
3. Run batch migration
4. Messages are not displayed in UI, only logged to database

Proposed resolution

Add support for configurable message interface in batch operations:
* Accept message_interface option in constructor
* Store message class in property
* Pass message interface through batch operations
* Use configurable message class instead of hardcoded MigrateMessage

Remaining tasks

* Review patch
* Test with modules that use custom message interfaces

User interface changes

None, this enables UI modules to display migration messages properly.

API changes

New optional message_interface parameter in options array. Backward compatible.

Data model changes

None.

🐛 Bug report
Status

Active

Version

6.0

Component

Code

Created by

🇯🇵Japan eleonel Itoshima 🇯🇵

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024