- Issue created by @Kristen Pol
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Update steps to reproduce.
- 🇳🇴Norway eiriksm Norway
While I understand what you mean very well, isn't this expected from modules providing content entities? I mean, the exact same thing would happen if you tried to uninstall the node or block_content module?
Maybe I am misunderstanding you, in which case I am sorry 🤓 If that's the case, could I ask you to try to explain again? ❤️
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
Sorry i wasn’t more clear. Normally for uninstalling, modules will have an uninstall hook and explain that there is data and it needs to be removed first and also provide and easy way to do that rather than having people have to manually delete database tables. Not everyone will know how to delete data in the database.
- 🇮🇳India SandeepSingh199
Yes i agree with eiriks, still if module needs a patch to cleanup i can get a patch for this cleanup scenario on module uninstall.
- 🇺🇸United States simplyshipley
I really like the idea of this module. and it seems to work well during my initial testing. But I'm not a fan of being forced to truncate production database tables to uninstall the module, so I will not be using it at this time. Are there plans to allow the linkchecker entities to be deleted through the UI in the future?
- 🇺🇸United States simplyshipley
I created a couple patches to help resolve this issue:
linkchecker-add-remove-all-links-button-to-admin-settings-form-3386292-7.patch
Adds a button to the LinkCheckerAdminSettingsForm.php file that allows users to delete all link data by reusing an existing method
$this->linkCleanUp->removeAllBatch();
linkchecker-added-delete-operation-and-route-to-linkchecker-entity-3386292-7.patch
This patch adds a the delete operation to the custom entity. It adds the core\Entity\ContentEntityDeleteForm as the delete form and a matching delete link. I also mapped the"label" = "lid"
so the link entity ids shows if using bulk operations. This patch also adds the new delete route to the LinkCheckerLinkRouteProvider.php.These patches allow users to delete individual link entities and/or delete all link entities to uninstall the module.