Schema change breaks existing config if not updated

Created on 23 September 2023, over 1 year ago
Updated 14 February 2024, about 1 year ago

Problem/Motivation

In #3155688: Configuration schema does not match with the data. the module schema was updated to remove the roles that are unselected from the configuration, which were previously saved as 0.

However there is no corresponding database update to fix existing config, so with this change, if you still have the old config then ALL roles are granted on registration -- even though the config page still appears to be correct.

Steps to reproduce

  1. Install this module at v1.1
  2. Export the config, see that unselected roles are included with a value of '0'
  3. Apply the patch from #3155688: Configuration schema does not match with the data.
  4. Register for an account, see that the user is granted all roles
  5. Re-save config and see the file is now updated to be correct

Proposed resolution

Add an update hook to fix existing configuration.

Remaining tasks

  1. Write a patch
  2. Make a new release ASAP!
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇺Australia pameeela

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

Comments & Activities

Production build 0.71.5 2024