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.
Whilst exporting a full export from the site's admin pages seems to produce a directory of valid config files, doing a drush @badev cex
raises an UnsupportedDataTypeConfigException
as follows:
@Iains-MBP BABuild]$ drush status
PHP executable : /Applications/MAMP/bin/php/php7.0.0/bin/php
PHP configuration : /Applications/MAMP/bin/php/php7.0.0/conf/php.ini
PHP OS : Darwin
Drush script : /Users/iainhouston/.composer/vendor/drush/drush/drush.php
Drush version : 8.0-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files : /Users/iainhouston/.drush/dev.bradford-abbas.uk.aliases.drushrc.php
/Users/iainhouston/.drush/staging.bradford-abbas.uk.aliases.drushrc.php
/Users/iainhouston/.drush/vagrant-badev.aliases.drushrc.php
[@Iains-MBP BABuild]$ drush @badev cex --destination=/Users/iainhouston/Documents/web/BABuild
Drupal\Core\Config\UnsupportedDataTypeConfigException: Invalid data type in config bad_format: A [error]
YAML file cannot contain tabs as indentation at line 2 (near " FOO: bar"). in
/Users/iainhouston/Documents/web/Drupal-dev-sites/platform_ba/core/lib/Drupal/Core/Config/FileStorage.php:103
Stack trace:
#0
/Users/iainhouston/Documents/web/Drupal-dev-sites/platform_ba/core/lib/Drupal/Core/Config/FileStorage.php(114):
Drupal\Core\Config\FileStorage->read('bad_format')
#1
/Users/iainhouston/Documents/web/Drupal-dev-sites/platform_ba/core/lib/Drupal/Core/Config/CachedStorage.php(100):
Drupal\Core\Config\FileStorage->readMultiple(Array)
#2
/Users/iainhouston/Documents/web/Drupal-dev-sites/platform_ba/core/lib/Drupal/Core/Config/StorageComparer.php(413):
Drupal\Core\Config\CachedStorage->readMultiple(Array)
#3
/Users/iainhouston/Documents/web/Drupal-dev-sites/platform_ba/core/lib/Drupal/Core/Config/StorageComparer.php(209):
Drupal\Core\Config\StorageComparer->getAndSortConfigData('vendor.symfony....')
#4 /Users/iainhouston/.composer/vendor/drush/drush/commands/core/config.drush.inc(444):
Drupal\Core\Config\StorageComparer->createChangelist()
#5 /Users/iainhouston/.composer/vendor/drush/drush/commands/core/config.drush.inc(407):
_drush_config_export(NULL, '/Users/iainhous...', false)
#6 /Users/iainhouston/.composer/vendor/drush/drush/includes/command.inc(364): drush_config_export()
#7 /Users/iainhouston/.composer/vendor/drush/drush/includes/command.inc(215):
_drush_invoke_hooks(Array, Array)
#8 /Users/iainhouston/.composer/vendor/drush/drush/includes/command.inc(183): drush_command()
#9 /Users/iainhouston/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(65):
drush_dispatch(Array)
#10 /Users/iainhouston/.composer/vendor/drush/drush/includes/preflight.inc(64):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /Users/iainhouston/.composer/vendor/drush/drush/drush.php(12): drush_main()
#12 {main}
Comments
Comment #2
swentel CreditAttribution: swentel as a volunteer commentedIf it's really drush, then you should report this in the Drush issue queue on github.
Comment #3
swentel CreditAttribution: swentel as a volunteer commentedWill be fixed by #2267039: UnsupportedDataTypeConfigException doesn't say which config file the problem is
Comment #4
swentel CreditAttribution: swentel as a volunteer commentedActually, it will tell us what file it will be, not necessarily fix the import.
Comment #6
alexpott@iainH any chance you can provide steps to reproduce? How did you create the bad_format config that lead to the error? Postponing on needing more information - we have a test in core that exports the config after installing every module (ConfigImportAllTest).
Comment #7
iainH CreditAttribution: iainH as a volunteer commentedThanks for looking into this. Can't reproduce this with my current setup (Drupal 8.0.5; Drush 8.0.5 PHP 5.6)
I notice that I encountered this issue when I was using PHP 7 with Drupal 8.0-dev and drush status was not reporting a connected Drupal.
For this project I'm not using PHP 7 right now ; reverted to PHP 5.6 to avoid updating dev tools, namely Ansible / Vagrant scripts.