unclecheese / silverstripe-gridfield-betterbuttons

Adds new form actions and buttons to the GridField detail form

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silverstripe 4 branch assumes Versioned

robingram opened this issue · comments

When trying to upgrade an existing site to SS4 using the recommended branch I'm getting errors when trying to edit a data object that isn't versioned.

This is because the Delete button calls $record->isPublished(). This is a change to the SS3 implementation which called a method in the GridFieldBetterButtonsItemRequest class that checked for the existence of the Versioned extension on the data object first.

Assume $record is "published" if it is not versioned.