The 9401 and 9402 update hooks can make a Drupal 9 to 10 update fail

Created on 23 July 2023, almost 2 years ago
Updated 14 August 2023, almost 2 years ago

Problem/Motivation

If the taxonomy_access_fix_update_9401 and taxonomy_access_fix_update_9402 hooks run in the same deploy as the user_update_10000 hook (e.g. during a site update from Drupal 9 to 10), the deploy can fail. This is because the taxonomy_access_fix update hooks change the permissions and save the roles, which causes an error if the role contains non-existent permissions:

Adding non-existent permissions to a role is not allowed.

Proposed resolution

Implement taxonomy_access_fix_update_dependencies to indicate that the taxonomy_access_fix update hooks have to run after the user update hook.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024