Custom content module not cleaning up old URLs on Delete/Update
Sitefinity newbie here, so please be gentle.
For all I know this may be expected behaviour, but I've noticed a couple of issues with a custom module I've created based upon the Products sample custom module. The groundwork of the module is basically identical, but has all references to 'Products' and 'Product' swapped out for 'Cars' and 'Car'.
The first issue is that when a Car content item is removed, it does not remove its associated URLs in the table sf_url_data. This can cause a NoSuchObjectException if a new Car content item is assigned the same URL as one which was previously deleted (full exception text at bottom of post).
The second issue is somewhat connected: when a new revision of a Car content item is published, it will create two new entries in sf_url_data without first clearing up any of the old ones.
I have to admit, I'm not quite sure where to begin with this. Code provided on request, but as previously stated, the module data access layer etc. are basically identical to the Products sample ( http://www.sitefinity.com/40/help/developers-guide/sitefinity-essentials-modules-creating-custom-modules-products-module.html )
Thanks in advance.
The product module is expected to clean up the urls in the sf_url_data on delete. It probably misses a correct parameter and fails silently. The delete request lands into the DeleteProduct method in the OpenAccessProvider class, which you can debug to check if some argument is incorrect or missing after the rename to Cars.
If it seems fine, I would suggest you to open a support ticket and send us the sample project. Then we will be able to reproduce it and give you back guidelines.
the Telerik team