- Issue created by @Vivek Panicker
- 🇮🇹Italy bigbabert Milano, Italy
Prevent configuration of Drupal AI provider if module isn't enabled and add message to notice users that Drupal AI Translate module needs to be installed enabled and configured to use Drupal AI provider.
- 🇮🇳India Vivek Panicker Kolkata
Hi @bigbabert, thank you for taking action on the issue and getting it fixed!
Just a query - will no credit be given for reporting the issue? - 🇮🇳India Vivek Panicker Kolkata
The issue does not seem to be resolved yet.
The issue is happening over here https://git.drupalcode.org/project/auto_translation/-/blob/1.0.x/src/Uti....
The method doesn't exist in the controller, but exists in a service, and I think that is what we need to fix. - 🇮🇳India divyansh.gupta Jaipur
I am also able to reproduce this error:
Also i found that translateContent function being used in Controller of auto_translate is being modified in this issue 📌 Discuss: Unify translate operations over ai Active , so i think we should modify the controller in auto_translate to comply with the changes made in ai_translate module. - 🇮🇹Italy bigbabert Milano, Italy
Looking into the service change of ai translate module, thanks for reporting and pointing to it.
- 🇮🇹Italy bigbabert Milano, Italy
Please if you find other issues raise there so we can fix it ;)
- 🇮🇳India Vivek Panicker Kolkata
@bigabert Now I get this error
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)
I checked. It's a valid error.
- 🇮🇹Italy bigbabert Milano, Italy
Hi @vivek,
thanks for the feedback, i see the issue it should be fixed in version 1.3.0 please when you can have test validate it.
Best regards
- 🇮🇳India Vivek Panicker Kolkata
@bigbabert I am still facing issues. So I have created this issue https://www.drupal.org/project/auto_translation/issues/3509171 📌 TypeError: Drupal\ai_translate\Controller\AiTranslateController::translateSingleText(): Argument #1 ($singleText) must be of type array Active and am raising a fix for it.