TypeError: Drupal\ai_translate\Controller\AiTranslateController::translateSingleText(): Argument #1 ($singleText) must be of type array

Created on 26 February 2025, 2 months ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

TypeError: Drupal\ai_translate\Controller\AiTranslateController::translateSingleText(): Argument #1 ($singleText) must be of type array, string given, called in /var/www/html/web/modules/contrib/auto_translation/src/Utility.php on line 218 in Drupal\ai_translate\Controller\AiTranslateController->translateSingleText() (line 133 of modules/contrib/ai/modules/ai_translate/src/Controller/AiTranslateController.php).
Drupal\auto_translation\Utility->drupalAiTranslateApiCall() (Line: 129)
Drupal\auto_translation\Utility->translate() (Line: 448)
Drupal\auto_translation\Utility->formTranslate() (Line: 39)
auto_translation_form_node_form_alter() (Line: 459)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 833)
Drupal\Core\Form\FormBuilder->prepareForm() (Line: 249)
Drupal\autosave_form\Form\AutosaveFormBuilder->prepareForm() (Line: 280)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm() (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm() (Line: 413)
Drupal\content_translation\Controller\ContentTranslationController->add()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Install v1.3.0 of the module and try to translate using AI.

Proposed resolution

NA

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

📌 Task
Status

Active

Version

1.3

Component

Code

Created by

🇮🇳India Vivek Panicker Kolkata

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