- πΊπΈUnited States josh.stewart Lexington, KY
I'd be interested in knowing if this is on the horizon at all. I don't know if I can help at all but I will try. Love this admin building experience from this module but have a client that needs moderation and/or revisions to work.
- π³π±Netherlands dennis_meuwissen
We are also running into this problem where we love how editors can build pages with this, but revisions are also a requirement. Here is our current still incomplete patch based on the work from the fork. We are using it exclusively to build the paragraph layouts in a frontend theme so this is untested with editing them inside the backend theme. Content moderation was also not a concern for us, so while the form elements for it are present they have not been tested.
Some observations:
- When editing a revision's layout paragraphs, the current revision will be loaded even though you would expect to edit that same revision. A separate route for editing revisions might make sense here to mirror how this works for editing node revisions.
- The fork code stores the layout paragraphs data in the form state, but it is unclear why. Other parts of layout paragraphs code such as the LayoutParagraphsBuilder element expect it to be available in the tempstore.
- Clearing the revision log message from user input does not work, even when rebuilding the revision form state. We had problems where the previous revision kept being reloaded after saving for reasons still unknown.
- First commit to issue fork.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Going to see if I can get the best of both the patch and MR into a new MR.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Okay so the old MR was actually better in a sense that it emptied out the form and relied solely on the things coming from the form display. Will restore that behavior. I got it to work locally already, just need to work on the validation and submission handling.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Okay, locally it works for me now.
I'm not sure why we need the following, but it was in the very first inception of this class:
$entity->$field_name = $this->layoutParagraphsLayout->getParagraphsReferenceField();
Also added a form state rebuild at the end of submit just to be safe.