After updating Drupal from 11.3.13 to 11.4.1, when attempting to access the editor's text format settings .../admin/config/content/formats , a fatal error occurs - this applies to formats using CKEditor5.
Settings cannot be changed anywhere that CKEditor5 affects settings, including SOLO theme settings.
The website encountered an unexpected error. Try again later.
RuntimeException: The autoloader expected class "Drupal\embed\Plugin\CKEditor5Plugin\EmbedCKEditor5PluginBase" to be defined in file "/home/pogoria/ftp/PROJECT/project.pingwin/web/modules/contrib/embed/src/Plugin/CKEditor5Plugin/EmbedCKEditor5PluginBase.php". The file was found but the class was not in it, the class name or namespace probably has a typo. in Symfony\Component\ErrorHandler\DebugClassLoader->checkClass() (line 376 of /home/pogoria/ftp/PROJECT/project.pingwin/vendor/symfony/error-handler/DebugClassLoader.php).
Symfony\Component\ErrorHandler\DebugClassLoader->loadClass('Drupal\embed\Plugin\CKEditor5Plugin\EmbedCKEditor5PluginBase')
class_exists('Drupal\embed\Plugin\CKEditor5Plugin\EmbedCKEditor5PluginBase', 1) (Line: 162)
Drupal\Component\Plugin\Discovery\AttributeClassDiscovery->getDefinitions() (Line: 67)
Drupal\Core\Plugin\Discovery\AttributeDiscoveryWithAnnotations->getDefinitions() (Line: 43)
Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator->getDefinitions() (Line: 31)
Drupal\Component\Plugin\Discovery\AttributeBridgeDecorator->getDefinitions() (Line: 86)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 340)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 216)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 164)
Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getAdminLibraries() (Line: 313)
Drupal\ckeditor5\Plugin\Editor\CKEditor5->buildConfigurationForm(Array, Object) (Line: 185)
Drupal\editor\Hook\EditorHooks->formFilterFormatFormAlter(Array, Object, 'filter_format_edit_form') (Line: 460)
Drupal\Core\Extension\ModuleHandler->alter(Array, Array, Object, 'filter_format_edit_form') (Line: 897)
Drupal\Core\Form\FormBuilder->prepareForm('filter_format_edit_form', Array, Object) (Line: 300)
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->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 638)
Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():638}()
Fiber->start() (Line: 639)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 92)
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: 61)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 753)
Drupal\Core\DrupalKernel->handle(Object) (Line: 34)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require_once('/home/pogoria/ftp/PROJECT/project.pingwin/web/autoload_runtime.php') (Line: 13)
PS.
The same error occurs when trying to add any paragraph containing a CKEditor5 text field!!!
Please help me quickly check and fix the error, as it's blocking work with the page content.
Comments
Comment #2
pingwin_cracow commentedComment #3
pingwin_cracow commentedComment #4
cilefen commentedThe error reads:
Confirm the file exists and its contents. Only you can do that.
Comment #5
pingwin_cracow commentedThe file exists in the specified directory
.../web/modules/contrib/embed/src/Plugin/CKEditor5Plugin/EmbedCKEditor5PluginBase.php
File Contents
I'm not sure where to look for incompatibilities.
Please let me know what you need from me to help.
I would be very grateful. Thank you.
Comment #6
macsim commentedI cannot reproduce that bug - it seems to be a problem specific to the embed contrib module
The namespace you pasted is not the same as the one in their repository
In the code you pasted :
namespace Drupal\entity_embed\Plugin\CKEditor5Plugin;In their repository:
namespace Drupal\embed\Plugin\CKEditor5Plugin;And since the error says that the file should be in
web/modules/contrib/embed/src/Plugin/CKEditor5Plugin/EmbedCKEditor5PluginBase.php, the namespace of that file should benamespace Drupal\embed\Plugin\CKEditor5Plugin;Comment #7
macsim commentedComment #8
cilefen commentedWere there Composer errors on update? This could be #3607866: Scaffold plugin does not always create autoload_runtime.php when upgrading to 11.4.
There isn’t enough to go on here as a bug report, except to say that it looks like the auto loader isn’t working.
Comment #9
macsim commentedI agree with you, it's not a bug report.
My bad, I opened the page a few hours ago and reloaded it with F5 rather than CTRL+F5 before posting my comment — selected options in the form kept the former values.
Still, the solution is in #6, I don't know why but the namespace in the file is not correct... and it has nothing to do with the core itself.
The namespace is also correct in the contrib module — it looks like someone manually edited the file in pingwin_cracow's project and wrote the wrong namespace
Comment #10
pingwin_cracow commentedThank you for the valuable tips. I will try to compare the paths.
I haven't edited any files before or after the update.
Updating from D 11.3.13 to 11.4.0 and 11.4.1
I'll do a test - I will install a bare D 11.4.1, add the embed and entity_embed modules - I will check if they work correctly and compare the file directories.
The embed module may not be fully ready for the automatic 11.4 update.
Of course, updates are only available through composer - there were no errors during the update.
I'll let you know what it looks like after comparing directories and files.
Best regards.
Comment #11
pingwin_cracow commented@macsim - Yes, you were right!
I corrected the paths from the repository:
namespace Drupal\entity_embed\Plugin\CKEditor5Plugin;to
namespace Drupal\embed\Plugin\CKEditor5Plugin;Everything seems to be working correctly, and editing is back to normal.
However, I don't know why or where the file name came from.
Thank you all for your help and explanation.
Best regards.
Comment #12
cilefen commented