+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Blog comment spam - thousands to delete :(

Blog comment spam - thousands to delete :(

4 posts, 0 answered
  1. IanP
    IanP avatar
    29 posts
    Registered:
    01 Nov 2009
    27 Jan 2012
    Link to this post
    Morning,

    One of the posts on our blog has had a couple of thousands spam comments added to it. I've had a look at SF's interface to see if there's a quick way to delete these, but it doesn't look like it. Before I go and delete these in the database I wanted to make sure I'm not going to orphan a bunch of records and make SF cry.

    I also wanted to double-check the table I should be looking at.

    Thanks a lot,

    Ian 
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    27 Jan 2012
    Link to this post
    IanP,

    I wouldn't recommend modifying the database directly. Sitefinity has a very rich API that can be used for something like this. The Working With Comments section of the 4.3 documentation has some nice example code.

    Hope that helps!
  3. David Arnold
    David Arnold avatar
    13 posts
    Registered:
    31 Jul 2009
    22 Apr 2015
    Link to this post
    Sorry for reposting on such an old thread, but Ian is right - I want to know which table to truncate. I shouldn't have to build a page to do what will take me seconds to do in the database. 
  4. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    30 Sep 2016
    27 Apr 2015
    Link to this post
    Hi David,

    Please note that we do not recommend to make manual changes to the database since this may harm your project. 

    The supported way to delete comments is through the Sitefinity backend under Content -> Comments or delete the comments using the API. You may refer to the following samples from our documentations for more details:

    Delete comments
    Delete comments (6.1 and below)

    This way the comments will be deleted properly from the database and there will be no orphan records remaining.

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered