- π¬π§United Kingdom entropea
So I did a didn't get any warning when uninstalling the BEF module (Gr8 module, btw! :)
drush pmu better_exposed_filters [error] A non-existent config entity name returned by FieldStorageConfigInterface::getBundles(): entity type: taxonomy_term, bundle: offences_relating_to_directive_2008_99, field name: field_offences_relating_to_direc [success] Successfully uninstalled: better_exposed_filters
The View in question is now gone without warning.
Sadly it was two days of work without doing a cex, ah well. Just hoping this behaviour can be changed to save any future heartache.
I think the first thing to try is to have all the plugins provided by this module implement
Drupal\views\Plugin\DependentWithRemovalPluginInterface
and itsonDependencyRemoval()
method. It might be convenient to use theDrupal\Core\Plugin\PluginDependencyTrait
as well. One example to look at is theDrupal\views\Plugin\views\field\EntityField
plugin.Basically you want
onDependencyRemoval()
to return TRUE when the BEF module is uninstalled, so that the plugin is removed and hopefully prevents the whole config entity from being deleted.Not sure whether this by itself is sufficient, since the views handlers/plugins ecosystem is complex, but it's probably a good place to start.
- π¬π§United Kingdom joachim
There are at least 2 separate issues here:
> The problem is that there needs to be logic to remove BEF from the view's configuration when BEF is no longer used on the view
> have all the plugins provided by this module implement Drupal\views\Plugin\DependentWithRemovalPluginInterface and its onDependencyRemoval() method
- First commit to issue fork.