Error message in log when trying ai tools in ai apli explorer

Created on 17 June 2025, about 2 months ago

Problem/Motivation

While checking the ai tools in ai api explorer I have encountered error message in log like

Error: Call to a member function getCommentedEntity() on null in Drupal\comment\Plugin\Validation\Constraint\CommentNameConstraintValidator->validate() (line 71 of /var/www/html/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraintValidator.php)
#0 /var/www/html/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(202): Drupal\comment\Plugin\Validation\Constraint\CommentNameConstraintValidator->validate()
#1 /var/www/html/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(154): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints()
#2 /var/www/html/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(106): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#3 /var/www/html/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php(93): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate()
#4 /var/www/html/core/lib/Drupal/Core/TypedData/TypedData.php(132): Drupal\Core\TypedData\Validation\RecursiveValidator->validate()
#5 /var/www/html/core/lib/Drupal/Core/Plugin/Context/Context.php(139): Drupal\Core\TypedData\TypedData->validate()
#6 /var/www/html/core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php(165): Drupal\Core\Plugin\Context\Context->validate()
#7 /var/www/html/modules/contrib/ai/modules/ai_api_explorer/src/Plugin/AiApiExplorer/ToolsExplorer.php(305): Drupal\ai\Base\FunctionCallBase->validateContexts()
#8 /var/www/html/modules/contrib/ai/modules/ai_api_explorer/src/Form/AiApiExplorerForm.php(82): Drupal\ai_api_explorer\Plugin\AiApiExplorer\ToolsExplorer->getResponse()
#9 [internal function]: Drupal\ai_api_explorer\Form\AiApiExplorerForm->ajaxResponse()
#10 /var/www/html/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array()
#11 /var/www/html/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(112): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse()
#12 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(246): Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException()
#13 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(206): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}()
#14 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(241): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#16 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#17 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#18 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#19 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#20 /var/www/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#21 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#22 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /var/www/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /var/www/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#27 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#28 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle()
#29 {main}
.

Steps to reproduce

Navigate to admin/config/ai/explorers/tools_explorer
select any ai tools and click run agent.
it shows fields required error which is expected along with

Error message
Oops, something went wrong. Check your browser's developer console for more details.

Check the recent error logs to see the above error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.2

Component

AI API Explorer

Created by

🇮🇳India anjaliprasannan

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

Comments & Activities

Production build 0.71.5 2024