I have fixed the paragraph edit form as well.
With the patch you can uncheck the option to use the paragraph_view_mode field in each paragraph type.
I have added the use of the New API for defining field type categories. https://www.drupal.org/node/3375748 β
This prevents that when trying to create any other new field you get an error due to the FieldType plugin category.
In comment#15 es default case when sourceEditing
plugin is added a JS error trowed (before saving the config, only dragging the plugin to enable it):
Uncaught TypeError: Cannot set properties of undefined (setting 'value')
at Drupal.verticalTab.focus (vertical-tabs.js?v=10.1.6:199:65)
at vertical-tabs.js?v=10.1.6:117:42
at Array.forEach ()
at Object.attach (vertical-tabs.js?v=10.1.6:64:68)
at drupal.js?v=10.1.6:166:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=10.1.6:162:34)
at HTMLDivElement. (ajax.js?v=10.1.6:1362:20)
at Function.each (jquery.min.js?v=3.7.0:2:3129)
at ce.fn.init.each (jquery.min.js?v=3.7.0:2:1594)
Everything works well in the en default case.
Here are my basic_html
editor config files in tree diferent cases
- es: This is the config in a modified site. The editor works fine if you remove de
sourceEditing
value from desettings.toolbar.items
list. If you add this value you have a JS error in de front (you see the tokens instead the buttons) and when try to change the editor to "none" you have the back error. - es default: The same case as above but I export the config from a clean default instalation
- en default: No errors π€―
Same error on a Drupal 10.1.6 default installation profile. Site default language Spanish.
I couldn`t reproduce this problem on a english (en) or portugΓͺs (pt-pt) sites.
When you try to change the format text editor to none you have this error stack:
TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in in_array() (line 659 of core/modules/ckeditor5/ckeditor5.module).
ckeditor5_editor_presave(Object)
call_user_func_array(Object, Array) (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'ckeditor5') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('editor_presave', Object) (Line: 416)
Drupal\Core\Extension\ModuleHandler->invokeAll('editor_presave', Array) (Line: 341)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave', Object) (Line: 529)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 257)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 609)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 255)
editor_form_filter_admin_format_submit(Array, Object)
call_user_func_array('editor_form_filter_admin_format_submit', Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('filter_format_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
If you add other languaje to the site (e.g english) you can change to that new language and edit de ckeditor ckeditor5-toolbar-configuration fieldset with no error.
The error only apear if de sourceEditing plugin is enabled.
No errors or warnings on Xdebug when loading de format edit page.