- Issue created by @mpotter
- πΊπΈUnited States mpotter
I was able to set a breakpoint and get a stack trace where this error happens:
Drupal\Core\Extension\ExtensionList->getExtensionInfo (my-project/docroot/core/lib/Drupal/Core/Extension/ExtensionList.php:347) _ckeditor5_theme_css (my-project/docroot/core/modules/ckeditor5/ckeditor5.module:241) Drupal\ckeditor5\Hook\Ckeditor5Hooks->libraryInfoAlter (my-project/docroot/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php:214) Drupal\Core\Extension\ModuleHandler->alter (my-project/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php:459) Drupal\Core\Asset\LibraryDiscoveryParser->parseLibraryInfo (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php:416) Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php:153) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:87) Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:66) Drupal\Core\Cache\CacheCollector->get (my-project/docroot/core/lib/Drupal/Core/Cache/CacheCollector.php:148) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibrariesByExtension (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:166) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryByName (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:173) Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition->validateDrupalAspects (my-project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php:236) Drupal\ckeditor5\Plugin\CKEditor5PluginManager->processDefinition (my-project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php:105) Drupal\Core\Plugin\DefaultPluginManager->findDefinitions (my-project/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:339) Drupal\Core\Plugin\DefaultPluginManager->getDefinitions (my-project/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:213) Drupal\ckeditor5\Plugin\ConfigAction\AddItemToToolbar->applySingle (my-project/docroot/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php:115) Drupal\ckeditor5\Plugin\ConfigAction\AddItemToToolbar->apply (my-project/docroot/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php:63) Drupal\Core\Config\Action\ConfigActionManager->applyAction (my-project/docroot/core/lib/Drupal/Core/Config/Action/ConfigActionManager.php:156) Drupal\Core\Recipe\RecipeRunner::processConfiguration (my-project/docroot/core/lib/Drupal/Core/Recipe/RecipeRunner.php:134) Drupal\Core\Recipe\RecipeRunner::installConfig (my-project/docroot/core/lib/Drupal/Core/Recipe/RecipeRunner.php:319)
- πΊπΈUnited States mpotter
From this trace it appears that my recipe needs to first set the default theme and also enable that theme before it can manipulate the editor config. That doesn't seem like an obvious requirement, but since the problem seems to be in the ckeditor5 module itself rather than the Recipe system specifically, it might just need to be documented, or moved to the CKEditor issue queue.
- πΊπΈUnited States mpotter
Although for some reason, even adding `stark` to the "install" section of the recipe works for this simple example, but not when this recipe is called as a subrecipe from another (even if installing stark in the main recipe). The only theme that seems to be installed when it gets to my subrecipe is "olivero", so setting that as the default theme config first works.
- πΊπΈUnited States mpotter
Here is another stack trace when it gives the same error but is being called as a sub-recipe. In this case, I even told it to enable `stark` and then also tried setting the default theme to `olivero`. But it doesn't seem to apply that config before getting the error.
Drupal\Core\Extension\ExtensionList->getExtensionInfo (my-project/docroot/core/lib/Drupal/Core/Extension/ExtensionList.php:347) _ckeditor5_theme_css (my-project/docroot/core/modules/ckeditor5/ckeditor5.module:241) Drupal\ckeditor5\Hook\Ckeditor5Hooks->libraryInfoAlter (my-project/docroot/core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php:214) Drupal\Core\Extension\ModuleHandler->alter (my-project/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php:459) Drupal\Core\Asset\LibraryDiscoveryParser->parseLibraryInfo (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php:416) Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php:153) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:87) Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:66) Drupal\Core\Cache\CacheCollector->get (my-project/docroot/core/lib/Drupal/Core/Cache/CacheCollector.php:148) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibrariesByExtension (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:166) Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryByName (my-project/docroot/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php:173) Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition->validateDrupalAspects (my-project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php:236) Drupal\ckeditor5\Plugin\CKEditor5PluginManager->processDefinition (my-project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php:105) Drupal\Core\Plugin\DefaultPluginManager->findDefinitions (my-project/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:339) Drupal\Core\Plugin\DefaultPluginManager->getDefinitions (my-project/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:213) Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getEnabledDefinitions (my-project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php:186) Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator->getConfigurableEnabledDefinitions (my-project/docroot/core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php:73) Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator->validate (my-project/docroot/core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php:34) Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints (my-project/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:202) Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode (my-project/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:154) Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode (my-project/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:164) Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate (my-project/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php:106) Drupal\Core\TypedData\Validation\RecursiveValidator->validate (my-project/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php:93) Drupal\Core\TypedData\TypedData->validate (my-project/docroot/core/lib/Drupal/Core/TypedData/TypedData.php:132) Drupal\Core\Config\Action\ConfigActionManager->applyAction (my-project/docroot/core/lib/Drupal/Core/Config/Action/ConfigActionManager.php:165) Drupal\Core\Recipe\RecipeRunner::processConfiguration (my-project/docroot/core/lib/Drupal/Core/Recipe/RecipeRunner.php:134) Drupal\Core\Recipe\RecipeRunner::installConfig (my-project/docroot/core/lib/Drupal/Core/Recipe/RecipeRunner.php:319) _batch_process (my-project/docroot/core/includes/batch.inc:297) batch_process (my-project/docroot/core/includes/form.inc:977) install_run_task (my-project/docroot/core/includes/install.core.inc:654) install_run_tasks (my-project/docroot/core/includes/install.core.inc:572) install_drupal (my-project/docroot/core/includes/install.core.inc:121) drush_call_user_func_array (my-project/vendor/drush/drush/includes/drush.inc:69) drush_op (my-project/vendor/drush/drush/includes/drush.inc:53) Drush\Commands\core\SiteInstallCommands->install (my-project/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php:170) call_user_func_array:{/var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php:276} (my-project/vendor/consolidation/annotated-command/src/CommandProcessor.php:276) Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback (my-project/vendor/consolidation/annotated-command/src/CommandProcessor.php:276) Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter (my-project/vendor/consolidation/annotated-command/src/CommandProcessor.php:212) Consolidation\AnnotatedCommand\CommandProcessor->process (my-project/vendor/consolidation/annotated-command/src/CommandProcessor.php:175) Consolidation\AnnotatedCommand\AnnotatedCommand->execute (my-project/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:387) Symfony\Component\Console\Command\Command->run (my-project/vendor/symfony/console/Command/Command.php:279) Symfony\Component\Console\Application->doRunCommand (my-project/vendor/symfony/console/Application.php:1094) Symfony\Component\Console\Application->doRun (my-project/vendor/symfony/console/Application.php:342) Symfony\Component\Console\Application->run (my-project/vendor/symfony/console/Application.php:193) Drush\Runtime\Runtime->doRun (my-project/vendor/drush/drush/src/Runtime/Runtime.php:110) Drush\Runtime\Runtime->run (my-project/vendor/drush/drush/src/Runtime/Runtime.php:40) include (my-project/vendor/drush/drush/drush.php:140) {main} (my-project/vendor/bin/drush.php:119)