Closed (fixed)
Project:
Sitemap
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2025 at 06:01 UTC
Updated:
29 Aug 2025 at 18:54 UTC
Jump to comment: Most recent
When I upgrade the module from previous versions to the latest one, I'm getting this error:
[notice] Update started: sitemap_update_8101
[error] Drupal\Core\Entity\EntityStorageBase::loadMultiple(): Argument #1 ($ids) must be of type ?array, string given, called in /app/source/web/modules/contrib/sitemap/sitemap.install on line 14
[error] Update failed: sitemap_update_8101
[error] Update aborted by: sitemap_update_8101
[error] Finished performing updates.
This happens because \Drupal\user\RoleStorage::loadMultiple(?array $ids = NULL): array (inherited from \Drupal\Core\Entity\EntityStorageBase::loadMultiple(?array $ids = NULL): array), but the update hook passes a string instead.
Install and configure 'drupal/sitemap:^2.0@RC', then upgrade to the latest version 'drupal/sitemap:^2.0'. Running drush updb, you will get the error.
Fix the call to loadMultiple():
- loadMultiple('administer site configuration');
+ loadMultiple(['administer site configuration']);
None.
None.
None.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
programeta commentedComment #4
dhruv.mittal commentedReviewing this
Comment #5
dhruv.mittal commentedChanges look good to me so moving it to RTBC
Comment #6
mparker17This looks good to me! Apologies for the time it took to review this.
Comment #8
mparker17Crediting contributors.
Comment #9
mparker17Updating issue summary and metadata.
Comment #10
mparker17I rebased and testbot is happy now, so I'm going to merge this shortly.
Comment #12
mparker17Okay! This has been merged! I'm reviewing the issues in the queue with an aim to make a release soon! Thanks again for your patience!
Comment #13
mparker17Quick update: the changes in this issue have been released in version 8.x-2.1.