Posted by xjm
This is a followup issue for.
Currently, the plugin system does not offer any consistent way to respond to changes in the derivative definition list. For example, when a custom menu is deleted, any menu blocks using that menu should also be deleted.
There are two possible resolutions:
- Each module that provides plugins is responsible for manually deleting the instances of those plugins that depend on removed derivative definitions. So, menu adds an
menu_delete(), custom_block adds something in $block->delete(), aggregator adds something in... uhm, yuck, aggregator_admin_remove_feed_submit()...
- We add a systematic way for block plugins (and/or other plugins) to indicate what data should be cleaned up when, perhaps by providing a method on the derivative class, or a hook, or... something...
In either case, we need to review all the block plugins that provide derivatives and ensure that their respective modules are cleaning up their data, and that this has test coverage.
This issue is postponed on, which introduces some patterns for interaction between configuration entities and the plugin system.
block_menu_delete()code into the menu module.