CKEditor tools not able to pass back a response

Created on 22 July 2024, about 1 year ago

Problem/Motivation

We have the AI module all set up nicely and working - the AI Explorer and Text tools on the righthand side of the node edit form all working well.

What does not appear to be working is the CKEditor 'AI Assistant' toolsโ€ฆ

Seems to behave pretty much as I expected although I think if you have text selected in the target field then that really ought to automatically copied into the particular form for you for example, if you are asking for a re-write then it stands to reason that you meant a re-write of the selected text. That was certainly my expectation.

Looks promisingโ€ฆ

Again, promisingโ€ฆ

Never quite delivers

The 'Ai status: 'Receiving ...' never disappears and I see the following errors in the browser JavaScript console...

(image there because copying as text seems troublesome)

For me this is completely repeatable and I have never seem anything delivered back from any of the CKEditor tools.

The full stack detailsโ€ฆ

Drupal 10.3.1
Apache/2.4.33 (Win64) OpenSSL/1.0.2u mod_fcgid/2.3.9 PHP/8.3.1
PHP 8.3.7, memory limit: 256M
MySQL 5.7.24
PHP Caching module: OpCache
Web browser: Version 126.0.6478.127 (Official Build) (64-bit)

I hope that's useful feedback and that someone may be able to us in the right direction.

Thanks

๐Ÿ’ฌ Support request
Status

Active

Version

1.0

Component

User interface

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

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

Comments & Activities

  • Issue created by @SirClickALot
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcus_johansson

    Could you check your logs if you find some error? It looks like a network error in the console.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcus_johansson

    So at /admin/reports/dblog

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

    @ Marcus_Johansson โ†’

    Yes, you are right, two warnings and an error in this precise order...

    WARNING
    =======
    
    Warning: Undefined array key "function" in Drupal\Core\Utility\Error::getLastCaller() (line 150 of C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php)
    #0 C:\Users\nick\Sites\bbb\core\includes\bootstrap.inc(166): _drupal_error_handler_real(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 150)
    #1 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php(150): _drupal_error_handler(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 150)
    #2 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php(63): Drupal\Core\Utility\Error::getLastCaller(Array)
    #3 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber.php(69): Drupal\Core\Utility\Error::decodeException(Object(Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException))
    #4 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber.php(118): Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onError(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent))
    #5 [internal function]: Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #6 C:\Users\nick\Sites\bbb\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #7 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(239): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...')
    #8 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException), Object(Symfony\Component\HttpFoundation\Request), 1)
    #9 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 C:\Users\nick\Sites\bbb\core\modules\big_pipe\src\StackMiddleware\ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #14 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #15 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #16 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #17 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #18 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #19 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #20 C:\Users\nick\Sites\bbb\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #21 {main}
    
    ERROR 
    =====
    Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException: The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned null. Did you forget to add a return statement somewhere in your controller? in () (line 98 of C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php).
    #0 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(181): ()
    #1 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
    #2 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #3 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #4 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #5 C:\Users\nick\Sites\bbb\core\modules\big_pipe\src\StackMiddleware\ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #6 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #7 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #8 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #9 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 C:\Users\nick\Sites\bbb\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #14 {main}
    
    WARNING
    =======
    Warning: Undefined array key "function" in Drupal\Core\Utility\Error::getLastCaller() (line 150 of C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php)
    #0 C:\Users\nick\Sites\bbb\core\includes\bootstrap.inc(166): _drupal_error_handler_real(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 150)
    #1 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php(150): _drupal_error_handler(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 150)
    #2 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\Utility\Error.php(63): Drupal\Core\Utility\Error::getLastCaller(Array)
    #3 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\EventSubscriber\FinalExceptionSubscriber.php(84): Drupal\Core\Utility\Error::decodeException(Object(Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException))
    #4 [internal function]: Drupal\Core\EventSubscriber\FinalExceptionSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #5 C:\Users\nick\Sites\bbb\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    #6 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(239): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...')
    #7 C:\Users\nick\Sites\bbb\vendor\symfony\http-kernel\HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException), Object(Symfony\Component\HttpFoundation\Request), 1)
    #8 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #9 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #10 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #11 C:\Users\nick\Sites\bbb\core\modules\big_pipe\src\StackMiddleware\ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #12 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #13 C:\Users\nick\Sites\bbb\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #14 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #15 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #16 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #17 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #18 C:\Users\nick\Sites\bbb\core\lib\Drupal\Core\DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
    #19 C:\Users\nick\Sites\bbb\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
    #20 {main}

    But no other network problems of any kind that I notice.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States kevinquillen

    Linking to a related issue that will replace the CKEditor UI with native Drupal.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland anaconda777

    Hi,
    Tested ckeditor5 with latest dev and the dropdown behaves differently depending of the text format.
    With fullhtml format the local llm started to generate something and the writer became idle,
    but the response never came back to the text box.
    With another text format the local llm did not even start doing anything even all settings looked to be similar.
    On the sidebar all looks to be working

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marcus_johansson

    @anaconda777 - moved your question to a new issue here and will close this issue since its outdated: https://www.drupal.org/project/ai/issues/3484046 ๐Ÿ› ckeditor5 with latest dev and the dropdown behaves differently depending of the text format Active

  • Status changed to Closed: outdated about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Kristen Pol Santa Cruz, CA, USA

    We are doing some issue management housekeeping and adding/removing components.

    The "Providers" and "User interface" components will be removed because providers have been moved into their own projects and user interface should be part of the relevant module/submodule, so this issue is being moved to "AI CKEditor".

    See ๐Ÿ“Œ Update AI module project components Active for more details.

Production build 0.71.5 2024