third party settings not removed from EntityViewDisplay when the module is uninstalled

Created on 11 October 2023, 8 months ago

Problem/Motivation

After uninstalling the module, if we export the configuration for our project via drush or via single export we still see traces of the third_party settings set by the module at the entity_view_display configs. They should be cleaned when we uninstall the module via hook_uninstall(). As an example, if we had a content type "Article" if we export the config "core.entity_view_display.node.article.default"
we still see third_party_settings related to panelizer after un-installing the module:

....
third_party_settings:
  panelizer:
    enable: false
    custom: false
    allow: false
    default: default
....

Steps to reproduce

  1. Install the module as usual
  2. Make usage of the module as usual.
  3. Export the configuration via drush cex or other method.
  4. Uninstall the module
  5. Export again the configuration via drush cex or other method.
  6. As a result, the third_party_settings used by the module is still present on the configuration and it is not cleaned.

Proposed resolution

We should implements hook_uninstall() to clean this config.

πŸ› Bug report
Status

Needs review

Version

5.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain jlbellido

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

Comments & Activities

  • Issue created by @jlbellido
  • Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 8 months ago
    Waiting for branch to pass
  • @jlbellido opened merge request.
  • Status changed to Needs review 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain jlbellido

    I've provided a MR with a first attempt to fix the issue which worked for me.
    Cheers

Production build 0.69.0 2024