Not removing permissions when you remove content type

Created on 15 February 2024, 4 months ago

Problem/Motivation

I am upgrading from Drupal 9.5.4 to Drupal 10. The Upgrade Status module tells me what has to be fixed before I upgrade, and it flags bad permissions that will cause a runtime error in Drupal 10. It took a while to figure, but was eventually reproducible.

Steps to reproduce

Create a custom content type. Give it some Entity Print permissions. Delete the content type. The permissions will not be deleted from the config database, and will throw an error in the Update Permissions database.

Workaround is to remove all of the permissions (checkboxes) in the Entity Print permissions table before you delete the content type. But you should not have to. When you delete a content type, it tells you the configurations it will modify or delete, but Permission or Access is not among those listed. There is probably just some further specification that needs to be made of "when you delete a content type, remove these permissions."

Proposed resolution

Specify the Access Config's that you modify when installing and mark them to be removed when a content type is deleted.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.13

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scottop

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

Comments & Activities

Production build 0.69.0 2024