TypeError when clicking "AI Translations": Argument #2 ($metadata) must be of type array, null given

Created on 14 May 2025, 19 days ago

Problem/Motivation

When clicking the "AI Translations" button (e.g., from the node translation UI), the following error is thrown:
TypeError: Drupal\ai_translate\TextExtractor::insertTextMetadata(): Argument #2 ($metadata) must be of type array, null given, called in /var/www/html/web/modules/contrib/ai/modules/ai_translate/src/Controller/AiTranslateController.php on line 182 in Drupal\ai_translate\TextExtractor->insertTextMetadata() (line 80 of /var/www/html/web/modules/contrib/ai/modules/ai_translate/src/TextExtractor.php).

Steps to reproduce

1. Set up a node with multilingual support and enable ai_translate.
2. Visit a node's Translate tab.
3. Click "AI Translations".
4. An error is thrown.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.1

Component

AI Core module

Created by

🇮🇳India Ishani Patel

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

Comments & Activities

Production build 0.71.5 2024