Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Suggested commit message:
Issue #2195957 by alexpott, tagini: Fixed Only install profile configuration when installing that profile, not when enabling associated modules.
If you try, in the D8 UI, to install/enable the CKEditor module and the Text Editor module at the same time, you get a fatal error. After which Editor is installed, but not CKEditor, and luckily the site is working OK, even though you got to the dreaded "rebuild needed" text. After that you can go back to Extend and install CKEditor and all is well.
Here's the error message:
If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild
Additional uncaught exception thrown while handling exception.
Original
Drupal\Component\Plugin\Exception\PluginException: The plugin (ckeditor) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 62 of /home/s20b4ed78094d56d/www/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass('ckeditor', Array)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('ckeditor', Array)
Drupal\Component\Plugin\PluginManagerBase->createInstance('ckeditor')
Drupal\editor\Entity\Editor->__construct(Array, 'editor')
Drupal\Core\Config\Entity\ConfigStorageController->create(Array)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'editor')
Drupal\Core\Extension\ModuleHandler->install(Array)
Drupal\system\Form\ModulesListConfirmForm->submitForm(Array, Array)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormBuilder->executeHandlers('submit', Array, Array)
Drupal\Core\Form\FormBuilder->processForm('system_modules_confirm_form', Array, Array)
Drupal\Core\Form\FormBuilder->buildForm('system_modules_confirm_form', Array)
Drupal\Core\Controller\FormController->getContentResult(Object)
call_user_func_array(Array, Array)
Drupal\Core\Controller\HtmlPageController->getContentResult(Object, Array)
Drupal\Core\Controller\HtmlPageController->content(Object, Array)
call_user_func_array(Array, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\HttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
drupal_handle_request()
Additional
Exception: _theme() may not be called until all modules are loaded. in _theme() (line 401 of /home/s20b4ed78094d56d/www/core/includes/theme.inc).
_theme('maintenance_page', Array)
drupal_render(Array)
_drupal_log_error(Array, 1)
_drupal_exception_handler(Object)
Comment | File | Size | Author |
---|---|---|---|
#15 | 2195957.15.patch | 5.77 KB | Wim Leers |
#14 | 2195957.test-only.patch | 594 bytes | alexpott |
Comments
Comment #1
swentel CreditAttribution: swentel commentedYou get the same kind of error if you uninstall the ckeditor. The node/add form or on admin/config/content/formats you'll get:
I would call this critical.
Comment #2
swentel CreditAttribution: swentel commentedRelated to #2007248: When CKEditor module is uninstalled, the right text editor config entities are affected but their labels are missing - which in itself is postponed on a META issue regarding plugin dependencies.
Comment #3
Wim LeersThis unfortunately did not get fixed by #2080823: Create API to discover config entities' soft dependencies and use this to present a confirm form on module uninstall, unlike #2007248-20: When CKEditor module is uninstalled, the right text editor config entities are affected but their labels are missing, but it seems related.
Comment #4
Wim LeersUpdate the error message to the latest.
Comment #5
jeroenmarinusComment #6
jeroenmarinusThe issue only presents itself when Drupal has been installed using the standard install profile. With the minimal install profile it does not.
I also found that it's actually only the (text) editor module that throws the error, not CKEditor.
This makes me think that the problem revolves around the text formats which are installed by the standard profile.
Steps to reproduce:
- Install Drupal with 'standard' install profile
- Uninstall CKEditor and Text Editor modules (as standard profile installs them by default)
- Install Text Editor module
--> Produces error
Comment #7
jeroenmarinusComment #8
jeroenmarinusInvestigating further I can confirm this problem is about the text formats.
When I remove the relevant files from the standard install profile, and try the steps I no longer get an error. Next I will be investigating if the editor module maybe does something wrong on uninstalling the text formats
Comment #9
jeroenmarinusLooking through the text formats that are installed by the standard profile, my guess is that the dependency on the ckeditor module is the culprit.
Somehow, when deinstalling the editor module, this dependency stays behind somewhere which causes an error when attempting to reinstall.
Comment #10
jhodgdonI'm glad someone is looking into this! Thanks tagini!
This is probably at least a Major bug, since it causes a system break.
Comment #11
Wim LeersYes, agreed. And actually probably even critical. Moving to critical for now.
This really does feel like either a
ModuleHandler
or CMI bug though. tagini's excellent investigative work strongly points in that direction.Comment #12
alexpottTagging
Comment #13
alexpottThe problem here is being caused by the default configuration from the standard profile being used again. The editor.editor.basic_html and editor.editor.full_html in standard profile have dependencies on ckeditor. We need to stop install profile configuration when config install is not being run during a Drupal install.
Comment #14
alexpottThe attached patch makes the config installer only scan the profile module's configuration during installation.
Comment #15
Wim LeersThis is a crystal clear explanation. Wonderful. Thank you!
Rerolling to fix nitpicks.
I should not be credited, but tagini should be — he did excellent investigative work that was substantial to solving the issue. And that's for his first core issue! Great work, tagini — thanks! :)
Hence added a suggested commit message to the IS.
Comment #17
BerdirThis looks good to me.
I tested it on my install profile, which has a lot of configuration and all seems fine.
Test addition looks fine as well and fails right now.
Comment #18
catchNice find :)
Fixed this on commit.
"Unless we are installing the profile, remove it from the list."
Committed/pushed to 8.0.x, thanks!
Comment #21
Wim LeersThanks for fixing for commit credit! :) And congrats, tagini, with your first core commit — a critical one to start with, very impressive!