-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete blocks #100
Comments
I stumbled upon this issue in the middle of a project after I created a couple of custom blocks :( I spent 2 hours figuring out what happens, and found a solution. The 3rd parameter of the constructor is $canDelete = true, but when setting the GridField config in the getEditForm() method the constructor for GridfieldConfig_BlockManager is called with false for that argument:
Change it to |
I also tried to do this by using the Extension API but it's not working since the
If that line would be there we shouldn't tamper with the core blocks source code - but I'm afraid there's no other way to make this work until it's not fixed. |
Forgot to mention where exactly fix this. It's in the getEditForm() method of the BlockAdmin.php class so change this:
to this:
|
It doesn't seem to be possible to delete blocks, even from the Block Admin. Should this be added to the config at least?
The text was updated successfully, but these errors were encountered: