This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.
When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:
Hello again,
When playing around with the blog module I noticed that I couldn't delete blog entries if they hadn't been assigned a category. I traced the problem to the Blog.cs business object. Basicly the code checks for the result of DBBlog.DeleteItemCategories before executing the delete of the blog item. Since DeleteItemCategories only returns true if there have been rows deleted, it skips deleting the blog item. Since there is a setting for "Show Categories" that the various pages respect I assume that this is an oversight. SVN diff is below, or I can send a patch if that is better.
Regards,
Cormac.
Index: mojoPortal.Business/Blog.cs =================================================================== --- mojoPortal.Business/Blog.cs (revision 3918) +++ mojoPortal.Business/Blog.cs (working copy) @@ -410,15 +410,15 @@ public bool Delete() { - bool result = DBBlog.DeleteItemCategories(itemID); + bool result = false; + DBBlog.DeleteItemCategories(itemID); DBBlog.DeleteAllCommentsForBlog(itemID); DBBlog.UpdateCommentStats(this.moduleID); - - + result = DBBlog.DeleteBlog(this.itemID); + if (result) { - result = DBBlog.DeleteBlog(this.itemID); DBBlog.UpdateEntryStats(this.moduleID);
Hi,
Thanks for reporting this. I will make a similar fix here and check it in to svn trunk by this evening.
Best,
Joe