Telling AI Assistant with Module Agent available to turn off the AI module causes fatal error

Created on 14 November 2024, 8 days ago

Problem/Motivation

This command should be expected to cause issues, but this wasn't the one I expected so I've added it as low priority.

The website encountered an unexpected error. Try again later.

TypeError: Drupal\aiagents\PluginBase\AiAgentBase::getStructuredOutput(): Return value must be of type Drupal\aiagents\Output\StructuredResultData, null returned in Drupal\aiagents\PluginBase\AiAgentBase->getStructuredOutput() (line 305 of modules/contrib/aiagents/src/PluginBase/AiAgentBase.php).

Drupal\aiagents\Plugin\AiAssistantAction\AgentAction->triggerAction() (Line: 406)
Drupal\aiassistantapi\AiAssistantApiRunner->process() (Line: 127)
Drupal\aichatbot\Form\ChatForm->submitForm()
calluserfuncarray() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 144)
Drupal\autosaveform\Form\AutosaveFormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 97)
Drupal\autosaveform\Form\AutosaveFormBuilder->buildForm() (Line: 242)
Drupal\aichatbot\Plugin\Block\ChatFormBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender()
calluserfunc_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 870)
Drupal\Core\Render\Renderer->doCallback() (Line: 432)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 476)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 163)
_TwigTemplatea6daddf5db7afd38bdd7a28820cbf4a7->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twigrendertemplate() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 476)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 92)
_TwigTemplatec80b4cee356caa7a247354cd1c770e6b->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twigrendertemplate() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
calluserfunc() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
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ยจC13Ccache\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: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

AI module still enabled after command.

Steps to reproduce

Prompts:

Turn off AI module

(assistant ask for action to be confirmed)

Yes

(Error generated)

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom MrDaleSmith

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

Comments & Activities

Production build 0.71.5 2024