Jump to:

23472 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Internal Server Error when trying to delete an entry

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 236 Views
  • Parker1090
    Avatar
    Community Member
    38 Posts

    Internal Server Error when trying to delete an entry Link to this post

    Hello,

    I'm using 3.0.5, and currently using the ModelAdmin for several data objects which is great (makes life a heck of a lot easier).

    However, I want to prevent deletion of certain items, so have put the following:

    public function canDelete() {
          return false;
    }


    While on the main view this removes to delete icon, when you click into an record it still shows a delete button. When you click it, it shows 'Internal Server Error', and generates the following:
    [Fri Oct 11 10:50:41 2013] [error] [client xxx.xxx.xxx.xxx] AH01215: PHP Fatal error: Call to a member function message() on a non-object in /silverstripe_folder/framework/forms/gridfield/GridFieldDetailForm.php on line 454

    On top of that, the function "canDelete" only appears to work on one of several data objects. Any suggestions on either of these please, as I'm a bit baffled!

    Thanks in advance!

    236 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.