Problem/Motivation
Drupal database update failed : Update process was canceled prematurely while performing update # in taxonomy_import_post_update_replace_misnamed_config.module.
Drupal database update failed after upgrading taxonomy import in the last stable version 2.0.8.
Here is the report :
ArgumentCountError : Too few arguments to function Drupal\Core\Config\Config::set(), 1 passed in /[...]/web/modules/contrib/taxonomy_import/taxonomy_import.post_update.php on line 16 and exactly 2 expected dans Drupal\Core\Config\Config->set() (/[...]/web/core/lib/Drupal/Core/Config/Config.php ligne 183)
#0 /[...]/web/modules/contrib/taxonomy_import/taxonomy_import.post_update.php(16): Drupal\Core\Config\Config->set(Array)
#1 /[...]/web/core/includes/update.inc(295): taxonomy_import_post_update_replace_misnamed_config(Array)
#2 /[...]/web/core/includes/batch.inc(295): update_invoke_post_update('taxonomy_import...', Array)
#3 /[...]/web/core/includes/batch.inc(137): _batch_process()
#4 /[...]/web/core/includes/batch.inc(93): _batch_do()
#5 /[...]/web/core/modules/system/src/Controller/DbUpdateController.php(186): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#6 [internal function]: Drupal\system\Controller\DbUpdateController->handle('start', Object(Symfony\Component\HttpFoundation\Request))
#7 /[...]/web/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array(Array, Array)
#8 /[...]/web/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request))
#9 /[...]/web/update.php(27): Drupal\Core\Update\UpdateKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#10 {main}
.
Steps to reproduce
Drupal 9.4.8 / PHP 8.0.8
Run composer update
Upgrading drupal/taxonomy_import (2.0.5 => 2.0.8)
Run update.php
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | use-setData-3314273-5.patch | 475 bytes | jon nunan |
Comments
Comment #2
fredfab commentedIt seems that drupal/core/config.php require two arguments in line 183: ($key, $value)
and that taxonomy_import.post_update.php only give one argument on line 16: $config->set($values)
https://www.zupimages.net/up/22/40/e7uf.png
Comment #3
mjchadwickI also just ran into this issue, with a similar environment. I'd fix it locally, but not sure which config key is correct, so please patch as soon as possible.
Comment #4
jon nunan commentedI think its actually meant to be using
$config->setData($values);as its copying the whole config object from one name to another. Unfortunately it also seems to delete the old config object before writing the new one, but I think theres only 2 values in there anyway.Comment #5
jon nunan commentedjust attaching patch
Comment #6
rishi.kulshreshthaI've tried the provided patch on Drupal 9.4.8 & it got applied cleanly & did the job. Thank you @Jon Nunan!
Comment #7
fredfab commentedPerfect! Thanks to @Jon Nunan, I can confirm the patch is working just fine.
Comment #9
vuil