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!