Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
The deployment script I'm uses symlinks of the core.extension.yml file from the related environment directory. I was unintentionally missing the file in my staging configs and it gave me this cryptic message:
// I've changed the directories and the drush command for privacy.
drush config-import core --partial --cache-clear=0
TypeError: Argument 2 passed to Drupal\config\StorageReplaceDataWrapper::replaceData() must be of the type array, boolean given, called in [error]
drush/drush/commands/core/config.drush.inc on line 619 in Drupal\config\StorageReplaceDataWrapper->replaceData() (line 198 of
web/core/modules/config/src/StorageReplaceDataWrapper.php) #0 vendor/drush/drush/commands/core/config.drush.inc(619):
Drupal\config\StorageReplaceDataWrapper->replaceData('core.extension', false)
#1 vendor/drush/drush/includes/command.inc(422): drush_config_import('core')
#2 vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#3 vendor/drush/drush/includes/command.inc(199): drush_command('core')
#4 vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#5 vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 vendor/drush/drush/drush.php(12): drush_main()
#7 {main}.
TypeError: Argument 2 passed to Drupal\config\StorageReplaceDataWrapper::replaceData() must be of the type array, boolean given, called in vendor/drush/drush/commands/core/config.drush.inc on line 619 in web/core/modules/config/src/StorageReplaceDataWrapper.php on line 198 #0 vendor/drush/drush/commands/core/config.drush.inc(619): Drupal\config\StorageReplaceDataWrapper->replaceData('core.extension', false)
#1 vendor/drush/drush/includes/command.inc(422): drush_config_import('core')
#2 vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#3 vendor/drush/drush/includes/command.inc(199): drush_command('core')
#4 vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#5 vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 vendor/drush/drush/drush.php(12): drush_main()
#7 {main}
TypeError: Argument 2 passed to Drupal\config\StorageReplaceDataWrapper::replaceData() must be of the type array, boolean given, called in vendor/drush/drush/commands/core/config.drush.inc on line 619 in Drupal\config\StorageReplaceDataWrapper->replaceData() (line 198 of web/core/modules/config/src/StorageReplaceDataWrapper.php).
Drush command terminated abnormally due to an unrecoverable error.
Another problem is that this causes the config page to give a white screen.
It would be nice if the feedback was more descriptive like 'Your core.extension.yml file is missing'.
Steps to reproduce, just delete your core.extension.yml and try to import.
Comments
Comment #2
cilefen CreditAttribution: cilefen as a volunteer commentedHave you tried this with the core UI? ConfigImportSubscriber seems to check for this very thing.
Comment #3
japo32 CreditAttribution: japo32 at Catalyst IT commented@cilefen, Do you mean using
/admin/config/development/configuration
? When I go there it just gives me a white screen.Comment #4
cilefen CreditAttribution: cilefen as a volunteer commentedOh. What is logged with the WSOD?
Comment #5
japo32 CreditAttribution: japo32 at Catalyst IT commentedIt's another type error. Here's the error:
Comment #6
mradcliffeI reproduced this in 8.4.4 when I started using a configuration directory with partial exports because there are things that I don't necessarily want to export. It looks like core.extension.yml is a required config, but I'm not sure if that's documented.
I don't plan on using the config synchronization functionality in the UI - only the export UI for development.
Comment #7
kapil17 CreditAttribution: kapil17 at Srijan | A Material+ Company commented@japo32 This can be reproduced when you remove your core.extension.yml from your config path. I guess your core.extension.yml is not present at the path defined in your local settings file. please check because in my multi site setup the core.extension was not there and it was creating the same issue and it is fixed when i placed that file in the path defined in local.settings.php.
Comment #9
thomaswalther CreditAttribution: thomaswalther commentedI do not know how to solve this.
If I open /admin/config/development/configuration I got this error: