Problem when I delete a post

Topics: Business Logic Layer
Dec 30, 2010 at 7:37 PM

I don't understan why with the original code it's impossible for me delete a post.

The DeletePost routine is never fired. I've nedd adjust the code in this mode in BlogBasePage.OnPreInit and in app_code/post.cs->DeletePost with insert a Post.Purge method betwen Post.Delete and Post.Save

I'm working with mdb database, if you want the modified ...

Dec 30, 2010 at 8:23 PM

It sounds like you're using the 2.0 RC, or one of the builds after that.

In 2.0, there's a new Trash feature.  If you delete a Post, Page or Comment, it is not physically deleted.  Instead, it goes into the "Trash" (like a recycle bin).  In the control panel, you can view the Trash items and permanently purge them (or restore them .. i.e. undelete).  When you permanently purge them, that's when DeletePost() is called.

Dec 30, 2010 at 8:45 PM

Thanks,  i see the new trush, but if one post is trashed I see that on the main page, nothing in trash (dashboard section->trush).


Dec 30, 2010 at 9:59 PM

Yes, that's right .. Dashboard -> Trash.

What version of BE are you using?  Is it BE (the RC) or a later build?

I think trash was working okay in the RC.  In the latest build, I was just now able to create a post, and delete it ... and it appears in the Trash.

When you get to the Trash page, you might want to make sure that "All" is selected above the trash grid where it says:

Show : All | Posts | Pages | Comments

Dec 31, 2010 at 6:46 AM

I'm using the later build