TypeError in DirectSaveProcessing when using AI Automators with modules that decorate the messenger service

Created on 8 August 2025, 4 days ago

Hello,

The `DirectSaveProcessing` class in AI Automators module fails with a TypeError when used alongside modules that decorate the core messenger service (such as ECA Helper ). The issue occurs because the class uses strict typing with the concrete `Messenger` class instead of the `MessengerInterface`.

Error Message:
TypeError: Drupal\ai_automators\Plugin\AiAutomatorProcess\DirectSaveProcessing::__construct(): Argument #3 ($messenger) must be of type Drupal\Core\Messenger\Messenger, Drupal\eca_helper\Decorate\Messenger given, called in /var/www/trasabilitate-deseuri/public_html/web/modules/contrib/ai/modules/ai_automators/src/Plugin/AiAutomatorProcess/DirectSaveProcessing.php on line 58

Fixed in AI 2.0.x and 1.2.x. For AI 1.1.x users, manual fix available here: https://git.drupalcode.org/project/ai/-/commit/737440e4e85a7e0cc0c40a91b...

Thanks!

🐛 Bug report
Status

Active

Version

1.1

Component

AI Automators

Created by

🇷🇴Romania gge

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