When performing updates from 2.6 to 2.7, I am getting the following error running updates with Drush:
TypeError: Argument 1 passed to Drupal\Core\Config\Config::setData() must be of the type array, null given, called in [error]
/var/www/html/modules/contrib/simple_sitemap/simple_sitemap.install on line 216 in Drupal\Core\Config\Config->setData()
(line 106 of /var/www/html/core/lib/Drupal/Core/Config/Config.php) #0
/var/www/html/modules/contrib/simple_sitemap/simple_sitemap.install(216): Drupal\Core\Config\Config->setData(NULL)This also happens when running the update script:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /update.php/start?id=15&op=do_nojs&op=do
StatusText: OK
ResponseText: TypeError: Argument 1 passed to Drupal\Core\Config\Config::setData() must be of the type array, null given, called in /var/www/html/modules/contrib/simple_sitemap/simple_sitemap.install on line 216 in Drupal\Core\Config\Config->setData() (line 106 of /var/www/html/core/lib/Drupal/Core/Config/Config.php).Using the dev version results in the same error.
Here is the stack trace:
#1 /var/www/vendor/drush/drush/commands/core/drupal/update.inc(60): simple_sitemap_update_8203(Array)
#2 /var/www/vendor/drush/drush/commands/core/drupal/batch.inc(163): drush_update_do_one('simple_sitemap', 8203, Array,
Object(DrushBatchContext))
#3 /var/www/vendor/drush/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#4 /var/www/vendor/drush/drush/includes/batch.inc(98): _drush_batch_command('15')
#5 /var/www/vendor/drush/drush/commands/core/drupal/update.inc(174): drush_batch_command('15')
#6 /var/www/vendor/drush/drush/commands/core/core.drush.inc(1224): _update_batch_command('15')
#7 /var/www/vendor/drush/drush/includes/command.inc(422): drush_core_updatedb_batch_process('15')
#8 /var/www/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#9 /var/www/vendor/drush/drush/includes/command.inc(199): drush_command('15')
#10 /var/www/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#11 /var/www/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12 /var/www/vendor/drush/drush/drush.php(12): drush_main()
#13 {main}.
Comments
Comment #2
dobrzyns commentedAdding results when running with the update script to the issue summary.
Comment #3
gbyteIt appears you are missing either simple_sitemap.custom, or simple_sitemap.entity_types from your configuration. I am not sure how this could happen. Can you paste the contents of all your configuration files beginning with simple_sitemap?
Comment #4
abaier commentedI also had a problem with this update. After running the update script from the web interface, returning to the update page, I got the following php error, wsod. It does not show up anymore after clearing all caches, but I am not sure if everything was updated as expected.
Comment #5
abaier commentedOk, I had to run update.php again to perform the updates correctly. Without errors this time.
Comment #6
dobrzyns commentedFrom the config export (using the Drush command with config_split), the only simple_sitemap config file I have is
simple_sitemap.settings.yml.simple_sitemap.settings.yml
Comment #7
gbyteIf you have v. 8.x-2.6, your simple_sitemap.settings.yml should include the
custom: {}key as well. No idea what happened to it; have you made any manual changes to the config?. Just add the above line at the bottom of the config using the devel module and then run the update. Alternatively just reinstall the module, but you will loose your config.Comment #8
gbyteComment #9
dobrzyns commentedI didn't edit the config files manually. I exported the config with Features as well, just to see the output, and that file was also missing
custom: {}. After adding this line to the bottom of the config file (core--removed Features config filesimple_sitemap.settings.yml), I still had the same errors on running updates.In the end, I just uninstalled and reinstalled the module to resolve the issue. Since this doesn't seem to be a common problem (I'm guessing there's something specific to my site somewhere), I'm closing the issue. (Ideally, I would do more investigation to try to figure out the exact cause but unfortunately do not have the bandwidth to do so right now.)
Comment #10
jeroentI had the same error when updating from 2.6 to 2.7. Re-installing the module solved the problem.
Comment #11
gbyteFixed in dev.