- Issue created by @robbt
- π΅π±Poland salmonek
Hi @robbt
On clean install we haven't spottend this issue so far.
Are there any errors apearing in the dblog after the AJAX error has been shown? Those (if present) should me more informative on what is the actual cause. - πΊπΈUnited States robbt
Ok, yeah it is probably a conflict then between an installed module/theme and the AJAX call.
I do indeed see 2 errors that are likely going to be more helpful in diagnosing the issue. Here's the first one.
Warning: Undefined array key "type" in Drupal\ckeditor5_plugin_pack_font\Plugin\CKEditor5Plugin\FontColor->buildConfigurationForm() (line 83 of /var/www/drupal/web/modules/contrib/ckeditor5_plugin_pack/modules/ckeditor5_plugin_pack_font/src/Plugin/CKEditor5Plugin/FontColor.php) #0 /var/www/drupal/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real() #1 /var/www/drupal/web/modules/contrib/ckeditor5_plugin_pack/modules/ckeditor5_plugin_pack_font/src/Plugin/CKEditor5Plugin/FontColor.php(83): _drupal_error_handler() #2 /var/www/drupal/web/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php(497): Drupal\ckeditor5_plugin_pack_font\Plugin\CKEditor5Plugin\FontColor->buildConfigurationForm() #3 /var/www/drupal/web/core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php(401): Drupal\ckeditor5\Plugin\Editor\CKEditor5->injectPluginSettingsForm() #4 /var/www/drupal/web/core/modules/editor/editor.module(161): Drupal\ckeditor5\Plugin\Editor\CKEditor5->buildConfigurationForm() #5 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): editor_form_filter_format_form_alter() #6 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(834): Drupal\Core\Extension\ModuleHandler->alter() #7 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(434): Drupal\Core\Form\FormBuilder->prepareForm() #8 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(633): Drupal\Core\Form\FormBuilder->rebuildForm() #9 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm() #10 /var/www/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm() #11 /var/www/drupal/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult() #12 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult() #13 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #14 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #16 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #17 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #18 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #19 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle() #20 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #21 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #22 /var/www/drupal/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #23 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #24 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #25 /var/www/drupal/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle() #26 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle() #27 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #28 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #29 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle() #30 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #31 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle() #32 {main}
And the second.
Warning: foreach() argument must be of type array|object, null given in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 113 of /var/www/drupal/web/core/lib/Drupal/Core/Render/Element/Checkboxes.php) #0 /var/www/drupal/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real() #1 /var/www/drupal/web/core/lib/Drupal/Core/Render/Element/Checkboxes.php(113): _drupal_error_handler() #2 [internal function]: Drupal\Core\Render\Element\Checkboxes::valueCallback() #3 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1278): call_user_func_array() #4 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(999): Drupal\Core\Form\FormBuilder->handleInputElement() #5 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #6 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #7 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #8 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #9 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #10 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #11 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #12 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm() #13 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(449): Drupal\Core\Form\FormBuilder->doBuildForm() #14 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(633): Drupal\Core\Form\FormBuilder->rebuildForm() #15 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm() #16 /var/www/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm() #17 /var/www/drupal/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult() #18 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult() #19 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #20 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #21 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #22 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #23 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #24 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #25 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle() #26 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #27 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #28 /var/www/drupal/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #29 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #30 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #31 /var/www/drupal/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle() #32 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle() #33 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #34 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #35 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle() #36 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #37 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle() #38 {main} .
- πΊπΈUnited States robbt
Oddly enough when I deployed this Plugin on the production server it worked without any issues. The only differences between the sites are the production is running PHP 8.1.29 and the dev site is running PHP 8.3.11 and FPM/FastCGI and has the upgrade_status module enabled. Otherwise they're more or less identical from a codebase perspective having recently cloned the production code and database to this dev server.
So maybe there is an issue with how FastCGI is working with the CKEditor Plugin Pack or the specific PHP Version but I'm not aware of any this difference in set up affecting any other aspects of the site.
I just thought I'd add this as it maybe helpful for anyone who runs into this issue in the future and if anyone is going to work on troubleshooting it further. Since it is working for me now in production there isn't a lot of incentive to try to fix this issue but if I determine the specific difference that caused it I'll chime in.
- Merge request !143478108 Added null coalesce for font color type value β (Open) created by salmonek
- π΅π±Poland salmonek
@robbt
I have added a PR with small change that will prevent those two warnings in dblog - it's woth fixing anyway.
Ok, I just noticed that you mentioned other ticket where same issue was fixed and it didn't help, so no need to test this fork.As of PHP version - I tested code before fixing on 8.1.29 and 8.3.11 (no FastCGI) and hadn't an AJAX error on both
- π΅π±Poland salmonek
In version 1.2.2 we have added a new submodule - Link Attributes. Could you test it's form - it works also with AJAX I wonder if there will be same issue occuring on your dev environment.
- πΊπΈUnited States robbt
So I've noticed that this dev server is having the same issue on other aspects of Drupal, so whatever is going on with AJAX isn't specifically related to this module at all. So I'm just going to close this although if I figure out what the cause was I may come back and update this in case someone ends up searching for a similar issue and I find a resolution but for now I think I can safely say it is not directly the result of anything with the CKEditor 5 Plugin Pack.