-
Notifications
You must be signed in to change notification settings - Fork 116
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
Non-inline editable blocks cannot be published via "three dots" menu #1310
Comments
I can't reproduce this with the steps provided on a fresh installation of Can you please update the reproduction steps to include everything needed to reproduce this? |
Thanks for the response Guy, I will double check the exact scenario. Might have something to do with child objects |
@GuySartorelli I think this is tied to Gridfields, I commented out the GridField in the getCMSFields() and the block was then publishable. Updated steps to mention gridfield |
Haven't looked at that yet but that would make sense - I believe in 5.3 we made a change so that the elemental area loads the form in react in order to submit a publish event which obviously will fail with gridfields, since there's no react component for those. A workaroundAs a workaround if you need something urgent you can replace This should work, and probably won't have unintended side effects, though I can't promise that. A fixA proper fix for this will need to stop loading the form when publishing a non-inline-editable block, which makes sense since you can't edit them in this context anyway, so you don't need to send the field values along with the publish request. I think inline-editable blocks should still have their data sent in the request in case you're doing a 'save and publish' - though if the |
Module version(s) affected
5.3.5
Description
When attempting to publish a block that is non-inline editable via "three dots" menu on the list of elements, an error toast is returned: "Error displaying the edit form for this block"
How to reproduce
Add a non-inline editable block that contains a Gridfield to a page. Click on it, make some edits and save (but don't publish). Go back the page and attempt to publish via the three dots. You'll see an error toast.
Possible Solution
No response
Additional Context
This could be caused by this change in 5.3: https://docs.silverstripe.org/en/5/changelogs/5.3.0/#elemental-validation
Validations
silverstripe/installer
(with any code examples you've provided)PRs
The text was updated successfully, but these errors were encountered: