Note that the ss4-upgrade branch does not seem to be fully compatible with SS 4.2. (I haven’t tested with 4.0 or 4.1). Composer is able to install it, but you will run into some PHP errors.
I got at least this error when going to view the edit page of a DataObject which uses better button custom actions:
PHP Fatal error: Call to a member function Link() on null in *website root path here*/betterbuttons/src/Actions/CustomAction.php on line 132.
I’ve just tried this on my SS4.2.2 upgrade project that’s almost finished. It broke basic editing of all DataObjects sadly looking for “isPublished”. Took it back out again.
I was waiting for it to go into core anyway but thought I’d give it a bash as I only really want the next / previous buttons.
It is coming soon. Hopefully in 4.3. Looking forward to that.
I had the same problem with ‘betterbuttons’ calling the missing ‘isPublished()’ method. I put this method in all my DataObject classes:
public function isPublished()
{
return $this->exists();
}
Not neat at all, but at least works. Although I ran into some other problems with my custom action buttons, which I had to take out. But at least the ‘previous’ and ‘next’ buttons are working well.
You are welcome!
Just to mention, I’ve experinced a few more issues with betterbuttons in SS4 (buttons that don’t do anything at least), so I’ve ended up removing betterbuttons completely in one of my projects.
I didn’t read that discussion as I don’t have time now, but at least it looks promising.
Edit: Whoops, this reply was meant for @sirjeffy . And the merging discussion is of course only applicable to SS4.x, so perhaps you’ll need to upgrade to 4 at some point :)).
Yes it looks like it has been fixed but not released??
So I grabbed the code for the delete button from here:
and added that which fixed the issue completely (from what I can see so far). The same error was happening with the Security Groups and Users - assuming anything with a delete button.