GroupContentEnabler plugins are responsible for the automatic creation of GroupContentType entities. When a plugin is disabled on a GroupType, the GroupContent that had the associated GroupContentType as its bundle will become orphaned. This is bad :)
Tasks:
- Disallow the uninstallation of a plugin from a GroupType when there is GroupContent using its GroupContentType
- Disallow the uninstallation of modules providing plugins matching the above criteria
Tip: Create a service for the second task.
group.uninstall_validator:
class: Drupal\group\Extension\GroupContentUninstallValidator
arguments: ['@plugin.manager.group_content_enabler', '@entity_type.manager', '@string_translation']
lazy: true
tags:
- { name: module_install.uninstall_validator }
Comments
Comment #2
mike.davis commentedThis patch provides the 'GroupContentUninstallValidator' class and updated service definition so that the Group Node module can not be uninstalled if there is node content on any of the groups.
Comment #3
mike.davis commentedUpdated status
Comment #4
kristiaanvandeneyndeRefactored it to work for all modules. Commit coming up.
Comment #6
kristiaanvandeneyndeComment #9
kristiaanvandeneyndeBad testbot! :)