-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates not removed from DB after deleting Module #97
Comments
What if you delete and then restore the module? Those templates need to be there still. Maybe a cascade on the templates table could be added instead? Is there the possibility of multiple forum instances using the same template? |
This was after I emptied the Recycle Bin. And they are related to a moduleId, so no way these are going to be used ever again IMO |
No, you're correct if this was emptied from the recycle bin. 👍🏽 |
I researched and tested this and found that this doesn't just affect templates--no content from any forum-related tables is deleted when a module instance is deleted and recycle bin is emptied. For other modules (like HTML/Text) this is implemented by adding reference and a cascading delete to the Modules table. For forums we would have to do something similar. Since ModuleId is not in every table, we'd either have to 1) put it in a reference where possible which might lead to orphans, 2) add ModuleId to all tables where it doesn't yet exist, and then reference back to Modules, or 3) add the reference from activeforums_forums and then put in a delete trigger that deletes from other tables when a forum is deleted. Regardless, need some serious digging into table dependencies beforehand. Thoughts? |
Yeah, it's probably just missing cascades that should be in place. |
Wow! This is amazing work, John. We're going to be in such a better place soon! :) Thank you so much for your hard work! |
Describe the bug
When you place Active Forums on a page, the templates are copied from \DesktopModules\ActiveForums\config\templates to the database.
But when you delete the module form a page, the Templates remain in the database while they should be removed IMO.
Software Versions
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should not be any template entries for this ModuleId in the activeforums_Templates table
The text was updated successfully, but these errors were encountered: