Problem/Motivation

Form modes and view modes for the module remain in configuration with a dependency on the module

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rodrigoaguilera created an issue. See original summary.

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

Status: Active » Needs review

Hi @rodrigoaguilera,

I looked into both Form modes and View modes. Here's what I found:

Form modes: Confirmed this is a bug. I was able to reproduce it, and the attached MR fixes the issue.
View modes: This is not an issue. `hook_entity_view_mode_presave()` already exists and correctly sets the `menu_item_fields` dependency, so view modes are cleaned up properly on uninstall.

So the bug is limited to Form modes only. The root cause was that `hook_entity_form_mode_presave()` was missing, while the equivalent hook for View modes was already implemented. This has been fixed in the attached MR please review.

  • rodrigoaguilera committed 7191b39f on 2.x
    Issue #3610128: Fixed Uninstalling module doesn't clean up display modes...
rodrigoaguilera’s picture

Status: Needs review » Fixed

I created the issue because after uninstalling some core.entity_form_display.menu_link_content.menu_link_content.FORM_MODE did not uninstall despite the dependency but I'm not able to reproduce anymore.

Anyway you fix is quite valid. Thanks for the contribution

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.