Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Can't delete comments?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1317 Views
  • chlo
    Avatar
    6 Posts

    Can't delete comments? Link to this post

    I've just started playing around with Silverstripe over the past few days (nice CMS btw!); and presently working my way through Tutorial 2. I've enabled comments, posted a few... but there's no way to remove them?

    I thought this unusual, so had a browse through the code and reached PageComment.php and it appears as though a delete link is supposed to appear when I'm logged in (though I could be mistaken)?

    I'm most certainly logged in! Any ideas?

  • xmedeko
    Avatar
    Community Member
    94 Posts

    Re: Can't delete comments? Link to this post

    Hi,

    is you use SS 2.0.1, then the membership checks in the PageComment.php are wrong. You have to fix them, or to set manually a flag CanCMSAdmin in the Group table in MySQL.

  • chlo
    Avatar
    6 Posts

    Re: Can't delete comments? Link to this post

    Hi, thanks for the reply.

    I am running SS2.0.1.

    Could you be a little more specific as to what/how I fix the membership checks in PageComment.php?

    I'm still quite new to PHP!

    Thanks in advance.

  • xmedeko
    Avatar
    Community Member
    94 Posts

    Re: Can't delete comments? Link to this post

    in PageComment.php replace all:
    [code php]
    if($member && $member->isCMSUser()) {

    for
    [code php]
    if($member) {

  • xmedeko
    Avatar
    Community Member
    94 Posts
    1317 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.