Uninstalling a module deletes all views that have third-party settings by that module

Created on 1 January 2025, 2 months ago

Problem/Motivation

When a module saves third-party settings on a view, uninstalling that module will delete the view (instead of just removing the third-party settings).

This exact problem is normally taken care of by \Drupal\Core\Config\Entity\ConfigEntityBase::onDependencyRemoval(). However, the Views entity class overrides the method but fails to call the parent (or fix the problem itself).

Steps to reproduce

  1. Write a small module that adds third-party settings to a view.
  2. Go to the โ€œUninstallโ€ page and select your module.
  3. On the confirm form, you will see that the view will get deleted.

Proposed resolution

Unless there is a good reason not to do that, I would suggest just calling the parent method.

Remaining tasks

  • Agree on the solution.
  • Implement it.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

views.module

Created by

๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024