Uninstall deletes fields shared with standard user

Created on 27 February 2024, 4 months ago

Problem/Motivation

I attempted to uninstall user_bundle locally to ensure it was a safe operation.

The new bundle was sharing the field `user_picture` with the standard user config. During the uninstall, all user_picture data was lost. Luckily this was just my local database that was trashed, could have been a lot worse.

Steps to reproduce

1. add a user bundle after module activation
2. give the new bundle the user_picture field
3. uninstall user_bundle
4. verify user_picture db table has been deleted

Proposed resolution

this issue https://www.drupal.org/project/user_bundle/issues/2980283 β†’ mentions

"It also may make sense, if possible, to move any fields on other user bundles to the standard "user" bundle so they're preserved. That way there's no data loss on uninstall - you're just back to the stock bundle-less experience where all fields sit on the one and only user type."

This seems like a better approach, manually deleting unwanted fields before or after uninstall would be trivial compared to losing data or restoring from backup. Maybe a note in the readme about the expected uninstall behavior would be helpful.

πŸ› Bug report
Status

Active

Version

1.2

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024