- Issue created by @AlfTheCat
- Assigned to marcus_johansson
-
marcus_johansson →
committed bb353c66 on 1.0.x
Issue #3475425 by marcus_johansson: TypeError: Drupal\ai_automator\...
-
marcus_johansson →
committed bb353c66 on 1.0.x
- Status changed to Fixed
2 months ago 2:03pm 19 September 2024 - 🇩🇪Germany marcus_johansson
Fixed and tested, first beta release is coming up with this fixed.
- 🇹🇭Thailand AlfTheCat
Hi Marcus, great, the error is gone. I had to uninstall the module and re-install but it's indeed fixed.
Also, and this is a more general issue with AI automators, when a field is set to use AI automator, it has to be saved twice.
In this case, initially, an error appears on the field edit page: Warning: Undefined array key "automator_ai_model" in Drupal\ai_automator\PluginBaseClasses\RuleBase->extraAdvancedFormFields() (line 189 of modules/contrib/ai/modules/ai_automator/src/PluginBaseClasses/RuleBase.php).
When saving a node, the site crashes and displays:
StatusText: 500 Service unavailable (with message) ResponseText: The website encountered an unexpected error. Try again later.TypeError: Drupal\ai\Base\AiProviderClientBase::getAvailableConfiguration(): Argument #2 ($model_id) must be of type string, null given in Drupal\ai\Base\AiProviderClientBase->getAvailableConfiguration() (line 309 of modules/contrib/ai/src/Base/AiProviderClientBase.php). ReflectionMethod->invokeArgs() (Line: 109) Drupal\ai\Plugin\ProviderProxy->wrapperCall() (Line: 81) Drupal\ai\Plugin\ProviderProxy->__call() (Line: 437) Drupal\ai_automator\PluginBaseClasses\RuleBase->prepareLlmInstance() (Line: 103) Drupal\google_places\Plugin\AiAutomatorType\AddressFieldFromText->generate() (Line: 70) Drupal\ai_automator\AiAutomatorRuleRunner->generateResponse() (Line: 25) Drupal\ai_automator\Batch\ProcessField::saveField() (Line: 296) _batch_process() (Line: 138) _batch_do() (Line: 94) _batch_page() (Line: 52) Drupal\system\Controller\BatchController->batchPage() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181) 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: 50) Drupal\ban\BanMiddleware->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: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)
When re-saving the field configurations the errors are gone. Actually saving information from Google places is not working, but that is a separate issue which I will open now.
- 🇩🇪Germany marcus_johansson
The second error mentioned in the comment should also be fixed now.
Automatically closed - issue fixed for 2 weeks with no activity.