Uninstalled external entity type is not removed

Created on 3 September 2019, over 5 years ago
Updated 1 February 2023, almost 2 years ago

As of 8.7, and as explained in [#3034742], if you want to remove an external entity type (through config import for example), one has to write an update hook as such:

function example_update_8701() {
  $entity_update_manager = \Drupal::entityDefinitionUpdateManager();
  $entity_type = $entity_update_manager->getEntityType('entity_type_id');
  $entity_update_manager->uninstallEntityType($entity_type);
}

I noticed this doesn't work in the case of external entity types. The external entity type config object is not removed, and thus the external type pops up again (after the update hook has run).

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇧🇪Belgium rp7

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands pgrond

    It looks like the plugin cache doesn't get cleared.

  • Status changed to Closed: works as designed almost 2 years ago
  • 🇳🇱Netherlands pgrond

    I've tested removing an exported config for an external entity type and reimported the config. The external entity type is removed correctly. It is not needed to write a hook for deletion of config entities. #3034742 is about updating entity types, not deleting theme.

    I will mark this issue as "works as designed" and open a new bug for the plugin cache issue.

Production build 0.71.5 2024