Ajax error when trying to add custom font color or highlight marker

Created on 1 October 2024, about 2 months ago

Problem/Motivation

From the text format configuration page under CKEditor5 Plugin Settings if I click Font Colors I see the checkbox to enable or disable

But if I click Add colors I get an AJAX error this one for Add Color

Uncaught 
Object { message: '\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /admin/config/content/formats/manage/full_html_ckeditor5?destination=/admin/config/content/formats&ajax_form=1\nStatusText: OK\nResponseText: \\[{"command":"settings","settings":{"ajaxPageState":{"theme":"claro_occ","theme_token":"6Ei-oVOxw4J2BwSb2i17t1BtOsxNOTvWF9QMTYsareY","libraries":"eJx9VUu22yAM3ZATRm8BbU876h44Mig2DSA_PknzVl9h7MRJaiaJuLqSQD-DNw4SSvA3AVXuICeSI5phTKLIVXyCjTfJgDVf2PVmkJOZUKxCp86oTaLwwbSEwYM9gnbG7yqO7GnwDn3ap_QQjWqoLanzZ6a0H_6oSOP3wtun6JAnsI61sE_CGPmq_Py4zxkRtPFDg0DBfJFPYH8b37g0l2Roqb1ups2CH3LTgzW-kRBrYsN7QEcX_EWB-2afFUe6znlv5CtSDgp_srKZtTih4sT_GCGAYk3LY7rZxrMT9Fu1nGwejJcTqLM8cVZ5IrQMOFlQKKrJK7xnzVVdLWhbmyfWyHNk64jVfljPO_xaaDn3udgedvgTF132AeG8BHgAOxYRLaokwdrF4gHsWCR0nIiEUawDxjnme93xPTvSJDWpXEZelhZbHLwrth6420x28oSQcsAoT9naqAKiFy_75Z17nQLRiV-vMSzBttDdVIJSFLQh9rlKL9vrv5RTmN-uH6w-yiEYLRj4ePVQ67et5VJKC4FEXUJHD5cDd2msqCSlxGCpB3sorT2PCVkLUzTVEV-FW7Jc42_KYFc3D-RQRj22KYnI9sD5YGermifNXPBQF8UGX8LjE-hAjbzQDh7csyKm2hEbaJ5BHWB4R7lmE_nIcavuPr1_PjOGG09WcFXjy_aZv0RlKaebRNejXmq8hTp-YnnDGmc5dieTLkZHsfzfz-Ub15UJhitGcig28jFehpaOd55xnXHq_qoiL23A-zAkldM9M8u5i1SWm5w_P3IulniHjmlETu1SKLEW7OXMHykFE36bAyZerqL8dDly-y9hi3w0XPv4D192Hbs"},"ajax":{"edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-add-custom-marker--7Qz4JwCiv9Q":{"callback":[{},"refreshColorsCallback"],"wrapper":"custom-colors-wrapper","event":"mousedown","keypress":true,"prevent":"click","url":"\\/admin\\/config\\/content\\/formats\\/manage\\/full_html_ckeditor5?destination=\\/admin\\/config\\/content\\/formats\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax","httpMethod":"POST","dialogType":"ajax","submit":{"_triggering_element_name":"op","_triggering_element_value":"Add Color"}},"edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-delete--qlpkuwo4GtY":{"callback":[{},"refreshColorsCallback"],"wrapper":"custom-colors-wrapper","event":"mousedown","keypress":true,"prevent":"click","url":"\\/admin\\/config\\/content\\/formats\\/manage\\/full_html_ckeditor5?destination=\\/admin\\/config\\/content\\/formats\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax","httpMethod":"POST","dialogType":"ajax","submit":{"_triggering_element_name":"color-0-delete","_triggering_element_value":"Remove"}}},"ajaxTrustedUrl":{"\\/admin\\/config\\/content\\/formats\\/manage\\/full_html_ckeditor5?destination=\\/admin\\/config\\/content\\/formats\\u0026ajax_form=1\\u0026_wrapper_format=drupal_ajax":true},"ckeditor5Premium":{"isMediaInstalled":true},"pluralDelimiter":"\\u0003","user":{"uid":"114","permissionsHash":"is-admin"}},"merge":true},{"command":"update_build_id","old":"form-R_5KJzeLJyqlSR20ZolTL2dsS3agxdHUW-fmuw2aWC0","new":"form-ba8dxzWkiy72rHq1QLFegNhQhI--hujT346bRd0C0hM"},{"command":"insert","method":null,"selector":null,"data":"\\n\\u003Cfieldset data-drupal-selector=\\u0022custom-colors-wrapper\\u0022 id=\\u0022custom-colors-wrapper\\u0022 class=\\u0022fieldset js-form-item form-item js-form-wrapper form-wrapper\\u0022\\u003E\\n    \\n  \\u003Cdiv class=\\u0022fieldset__wrapper\\u0022\\u003E\\n        \\n        \\n\\u003Cfieldset data-drupal-selector=\\u0022colors-container\\u0022 id=\\u0022colors-container\\u0022 class=\\u0022fieldset js-form-item form-item js-form-wrapper form-wrapper\\u0022\\u003E\\n    \\n  \\u003Cdiv class=\\u0022fieldset__wrapper\\u0022\\u003E\\n        \\n        \\u003Cdiv class=\\u0022js-form-item form-item js-form-type-textfield form-type--textfield js-form-item-editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-label form-item--editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-label\\u0022\\u003E\\n      \\u003Clabel for=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-label--Ms4zZ_HYd0s\\u0022 class=\\u0022form-item__label\\u0022\\u003EColor label\\u003C\\/label\\u003E\\n        \\u003Cinput data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-label\\u0022 type=\\u0022text\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-label--Ms4zZ_HYd0s\\u0022 name=\\u0022editor[settings][plugins][ckeditor5_plugin_pack_font__font_color][custom_colors_wrapper][0][label]\\u0022 value=\\u0022\\u0022 size=\\u002260\\u0022 maxlength=\\u0022255\\u0022 class=\\u0022form-text form-element form-element--type-text form-element--api-textfield\\u0022\\/\\u003E\\n        \\u003C\\/div\\u003E\\n\\u003Cdiv class=\\u0022js-form-item form-item js-form-type-color form-type--color js-form-item-editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-color form-item--editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-color\\u0022\\u003E\\n      \\u003Clabel for=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-color--__WBojn77Rs\\u0022 class=\\u0022form-item__label\\u0022\\u003EColor\\u003C\\/label\\u003E\\n        \\u003Cinput data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-color\\u0022 type=\\u0022color\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-color--__WBojn77Rs\\u0022 name=\\u0022editor[settings][plugins][ckeditor5_plugin_pack_font__font_color][custom_colors_wrapper][0][color]\\u0022 value=\\u0022\\u0022 class=\\u0022form-color form-element form-element--type-color form-element--api-color\\u0022\\/\\u003E\\n        \\u003C\\/div\\u003E\\n\\n\\u003Cfieldset data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type--Z1MG-mPxXtU--wrapper\\u0022 class=\\u0022fieldgroup form-composite fieldset fieldset--group js-form-item form-item js-form-wrapper form-wrapper\\u0022\\u003E\\n      \\u003Clegend class=\\u0022fieldset__legend fieldset__legend--composite fieldset__legend--visible\\u0022\\u003E\\n    \\u003Cspan class=\\u0022fieldset__label fieldset__label--group\\u0022\\u003EType\\u003C\\/span\\u003E\\n  \\u003C\\/legend\\u003E\\n  \\n  \\u003Cdiv class=\\u0022fieldset__wrapper fieldset__wrapper--group\\u0022\\u003E\\n        \\n        \\u003Cdiv id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type--Z1MG-mPxXtU\\u0022 class=\\u0022form-checkboxes form-boolean-group\\u0022\\u003E\\u003Cdiv class=\\u0022js-form-item form-item js-form-type-checkbox form-type--checkbox form-type--boolean js-form-item-editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-type-font form-item--editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-type-font\\u0022\\u003E\\n        \\u003Cinput data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-font\\u0022 type=\\u0022checkbox\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-font--vi6UBTMNVGY\\u0022 name=\\u0022editor[settings][plugins][ckeditor5_plugin_pack_font__font_color][custom_colors_wrapper][0][type][font]\\u0022 value=\\u0022font\\u0022 class=\\u0022form-checkbox form-boolean form-boolean--type-checkbox\\u0022\\/\\u003E\\n        \\u003Clabel for=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-font--vi6UBTMNVGY\\u0022 class=\\u0022form-item__label option\\u0022\\u003EFont Color\\u003C\\/label\\u003E\\n      \\u003C\\/div\\u003E\\n\\u003Cdiv class=\\u0022js-form-item form-item js-form-type-checkbox form-type--checkbox form-type--boolean js-form-item-editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-type-background form-item--editor-settings-plugins-ckeditor5-plugin-pack-font__font-color-custom-colors-wrapper-0-type-background\\u0022\\u003E\\n        \\u003Cinput data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-background\\u0022 type=\\u0022checkbox\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-background--ru1_edBUyMM\\u0022 name=\\u0022editor[settings][plugins][ckeditor5_plugin_pack_font__font_color][custom_colors_wrapper][0][type][background]\\u0022 value=\\u0022background\\u0022 class=\\u0022form-checkbox form-boolean form-boolean--type-checkbox\\u0022\\/\\u003E\\n        \\u003Clabel for=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-type-background--ru1_edBUyMM\\u0022 class=\\u0022form-item__label option\\u0022\\u003EBackground Color\\u003C\\/label\\u003E\\n      \\u003C\\/div\\u003E\\n\\u003C\\/div\\u003E\\n\\n            \\n      \\u003C\\/div\\u003E\\n\\u003C\\/fieldset\\u003E\\n\\u003Cinput data-color-id=\\u00220\\u0022 data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-delete\\u0022 type=\\u0022submit\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-0-delete--qlpkuwo4GtY\\u0022 name=\\u0022color-0-delete\\u0022 value=\\u0022Remove\\u0022 class=\\u0022button button--danger js-form-submit form-submit\\u0022\\/\\u003E\\n            \\n      \\u003C\\/div\\u003E\\n\\u003C\\/fieldset\\u003E\\n\\u003Cinput data-drupal-selector=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-add-custom-marker\\u0022 type=\\u0022submit\\u0022 id=\\u0022edit-editor-settings-plugins-ckeditor5-plugin-pack-font-font-color-custom-colors-wrapper-add-custom-marker--7Qz4JwCiv9Q\\u0022 name=\\u0022op\\u0022 value=\\u0022Add Color\\u0022 class=\\u0022button js-form-submit form-submit\\u0022\\/\\u003E\\n            \\n      \\u003C\\/div\\u003E\\n\\u003C\\/fieldset\\u003E\\n","settings":null}]', name: "AjaxError", stack: "@/core/misc/ajax.js?v=10.3.5:196:32\n@http://127.0.0.1/core/misc/ajax.js?v=10.3.5:1921:3\n" }
ajax.js:196:32

This one for add marker under highlight

Message: '\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /admin/config/content/formats/manage/full_html_ckeditor5?destination=/admin/config/content/formats&ajax_form=1\nStatusText: OK\nResponseText: \\[{"command":"settings","settings":{"ajaxPageState":{"theme":"claro_occ","theme_token":"6Ei-oVOxw4J2BwSb2i17t1BtOsxNOTvWF9QMTYsareY","libraries":"eJx9VUu22yAM3ZATRm8BbU876h44Mig2DSA_PknzVl9h7MRJaiaJuLqSQD-DNw4SSvA3AVXuICeSI5phTKLIVXyCjTfJgDVf2PVmkJOZUKxCp86oTaLwwbSEwYM9gnbG7yqO7GnwDn3ap_QQjWqoLanzZ6a0H_6oSOP3wtun6JAnsI61sE_CGPmq_Py4zxkRtPFDg0DBfJFPYH8b37g0l2Roqb1ups2CH3LTgzW-kRBrYsN7QEcX_EWB-2afFUe6znlv5CtSDgp_srKZtTih4sT_GCGAYk3LY7rZxrMT9Fu1nGwejJcTqLM8cVZ5IrQMOFlQKKrJK7xnzVVdLWhbmyfWyHNk64jVfljPO_xaaDn3udgedvgTF132AeG8BHgAOxYRLaokwdrF4gHsWCR0nIiEUawDxjnme93xPTvSJDWpXEZelhZbHLwrth6420x28oSQcsAoT9naqAKiFy_75Z17nQLRiV-vMSzBttDdVIJSFLQh9rlKL9vrv5RTmN-uH6w-yiEYLRj4ePVQ67et5VJKC4FEXUJHD5cDd2msqCSlxGCpB3sorT2PCVkLUzTVEV-FW7Jc42_KYFc3D-RQRj22KYnI9sD5YGermifNXPBQF8UGX…', name: "AjaxError", stack: "@http://127.0.0.1/core/misc/ajax.js?v=10.3.5:196:32\n@http://127.0.0.1/core/misc/ajax.js?v=10.3.5:1921:3\n" }

This seems unrelated to the other issue on the issue queue - https://www.drupal.org/project/ckeditor5_plugin_pack/issues/3469207 πŸ› Error adding font color RTBC as I tested that patch and the issue remained.

Steps to reproduce

I haven't tested on a clean install yet but add the plugin pack and enable modules
Go to /admin/config/content/formats/manage/full_html_ckeditor5
Add the font colors to the toolbar
Click font colors
Click Add Colors and it says processing and then an error is in the javascript console and nothing happens

Proposed resolution

I'm using the CDN. Next step is to see if using local files fixes this issue. Also need to test to see if this issue occurs on a clean install as it is possible that another module is interfering with it.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robbt

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

Merge Requests

Comments & Activities

  • 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.

  • πŸ‡΅πŸ‡±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.

Production build 0.71.5 2024