silverstripe-gridfield-betterbuttons icon indicating copy to clipboard operation
silverstripe-gridfield-betterbuttons copied to clipboard

Cannot remove actions of versiond data object detail form

Open Valandur opened this issue 7 years ago • 0 comments

In a normal data object one can have a function such as:

public function getBetterButtonsActions() {
	return FieldList::create();
}

to clear all action buttons in the grid field detail form.

When using the same code for a versioned data object the default buttons "save", "publish", etc. remain, meaning one can only add new buttons, not remove existing ones.

This seems to be due to the difference in Controllers\ItemRequest.php where this code overwrites the buttons, whereas in Controllers\VersionedItemRequest this code only causes the buttons to be appended.

Why is there the difference in this behavior? And is there any way to change this and/or remove buttons from the gridfield detail form of versioned objects?

Valandur avatar Jul 02 '18 14:07 Valandur