Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Delete Module InstanceDelete Module Instance
Previous
 
Next
New Post
7/20/2007 10:59 PM
 

A couple of points for the discussion:

1. I thought that one of the requirements for successful module review was that it completely cleaned up after itself upon deletion, leaving no orphened records, etc. in the database tables.

2. Because of the problems that foreign key constraints on core tables could cause, I was very reluctant to use this route, but saw no real alternative and followed the example of several core team/project team members. The suggestion to use the scheduler is a good one, but adds an extra degree of development time and knowlege that most developers may not persue. What about adding a SQL trigger on a core table?

3. The reason that "nickka2" may not be seing records deleted in his custom tables when the module instance is deleted (even though he has enabled cascade deletes), is that when a module is deleted from a page, it is placed in the recycle bin.  I don't beleve the cascade delete would occur until the recycle bin is emptied of the previously deleted module.

4. We really need to be able to run custom cleanup code upon module deletion and need to be able to hook up a method (probably in our business controller class) that will be called just before a module is finally deleted from the recycle bin (while its ModuleID is still valid) - similar to the UpdateModule method provided in the IUpdatable interface.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
7/21/2007 8:20 AM
 

imagemaker wrote

I thought that one of the requirements for successful module review was that it completely cleaned up after itself upon deletion, leaving no orphened records, etc. in the database tables.

When you delete your module from the DNN installation your uninstall script is run and all tables and records should be cleaned up then. But yes I know that's not what we are talking about, we are talking about deleting them from a page.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/21/2007 8:22 AM
 

hooligannes 2.0 wrote

  • A module developer that adds the foreign keys, must register them in a central repository related to the module he/she developed.
  • On upgrades DNN checks for this keys and drops them before running the upgrade process, after it's finished it readds them and registers them again.

Of course that would work, but would it be hard from developers to understand and implement properly? I don't know.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/21/2007 10:30 AM
 

I did clear out the Recycle Bin and the records are still there. I guess I'll have to get into Debug mode and see if the stored procedure to delete the record from the Module table is being called at all. Not sure where to even set this breakpoint; I guess I'll have to dig into the DNN code.

It seems like if the stored procedure was being called and failed, I would see an exception message on the page.

 
New Post
7/21/2007 11:45 AM
 

imagemaker wrote

We really need to be able to run custom cleanup code upon module deletion and need to be able to hook up a method (probably in our business controller class) that will be called just before a module is finally deleted from the recycle bin (while its ModuleID is still valid) - similar to the UpdateModule method provided in the IUpdatable interface.

I think this would be the solution that would be most consistent with the Framework. This may already be on the roadmap. If it is not it is an opportunity for someone to write the code then post the code to http://support.DotNetNuke.com (you first create an "enhancement issue" then post the solution).



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Delete Module InstanceDelete Module Instance


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out