Unable to uninstall CKEditor4

Created on 9 January 2023, almost 2 years ago
Updated 24 February 2023, almost 2 years ago

Problem/Motivation

After Upgrading to CKEditor5 I was trying to Uninstall CKeditor4.

The Uninstall via /admin/modules/uninstall/confirm results in an

The website encountered an unexpected error. Please try again later.

The database logs show:


Error: Call to a member function label() on null in Drupal\editor\Entity\Editor->label() (Zeile 108 in /var/www/html/web/core/modules/editor/src/Entity/Editor.php)

#0 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigDependencyDeleteFormTrait.php(105): Drupal\editor\Entity\Editor->label()
#1 /var/www/html/web/core/modules/system/src/Form/ModulesUninstallConfirmForm.php(160): Drupal\system\Form\ModulesUninstallConfirmForm->addDependencyListsToForm()
#2 [internal function]: Drupal\system\Form\ModulesUninstallConfirmForm->buildForm()
#3 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(534): call_user_func_array()
#4 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(281): Drupal\Core\Form\FormBuilder->retrieveForm()
#5 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#6 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#7 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#8 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#15 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#16 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#17 /var/www/html/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\page_cache\StackMiddleware\PageCache->handle()
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle()
#19 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#20 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#21 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\StackedHttpKernel->handle()
#22 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#23 {main}

Removing the "modules/contrib/ckeditor" folder makes the complete website unusable:

500 Internal Server Error


The website encountered an unexpected error. Please try again later.

I am using Drupal 9.5.1, CkEditor 1.0.1

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Postponed: needs info

Version

1.0

Component

Miscellaneous

Created by

🇩🇪Germany Lemontonix

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇹Austria nofue

    As I upgraded some 10+ sites to ck5 this afternoon, there was (luckily) no problem at all. Maybe you miss a small task in the process? Here's my step by step instruction for upgrading ck4 to ck5:

    Upgrade the site to the most current version of every module installed. As I work with composer, that's
    composer update -W

    Next I make sure all the upgrades are properly registered. As I work with drush, that's
    drush updb && drush cr

    To make sure, I check the site's status at /admin/reports/status

    If everything looks nice, with a hint of deprecated modules and themes being installed, I head to /admin/modules
    and install CK5, after which I head to /admin/config/content/formats

    Replace every appearance of CK with CK5 to prevent any text field from calling a non existing editor later.

    Now head to /admin/modules/uninstall
    search for CK (along with color, rdf and quickedit) and remove these all at once.

    Per usual I do another
    drush updb && drush cr
    at this point, just to make sure, and that's it.

    Hope this helps -- if not, let us know what you did.

    Just in case: When you removed a module, you can always try to install it again to recover from the error.
    This of course will only be an option if you setup composer and drush to be at hand on the shell when you need it.
    Usually I can get back to business specifying /admin when trying to enter a WSOD site (i.e. https://example.com/admin)

  • Status changed to Postponed: needs info almost 2 years ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Removing the "modules/contrib/ckeditor" folder makes the complete website unusable:

    You should first uninstall the module through the Drupal UI. That will also force you to update your Text Editors to stop using CKEditor 4 first — because just removing the module altogether like you did will cause fatal PHP errors. Which are the ones you're seeing 😊

Production build 0.71.5 2024