- Issue created by @teknocat
- 🇨🇦Canada teknocat
By the way, I have also tried enabling frontend editing for the node types using the paragraphs as well as the paragraphs themselves, AND enabling frontend editing for the Content Moderation State.
If you enable the hover highlight mode then having both the paragraphs and node editing enabled is fine in terms of the UI, as they don't overlap and interfere. With that you can have a live preview, except that modifications to the paragraphs themselves (their content or display order) is not reflected in the preview.
I also found that, with the Gin theme, if you do not expand the sidebar then the content moderation and all the other items normally in sidebar tabs on the normal edit page don't show up. If you scroll down in the frontend editing sidebar there's a big space where that would be. But that would be a separate issue to address.
In any case, editing the entire node is currently the only way to access the moderation state and still doesn't help if you just want to change the display order of paragraphs in the page without editing the whole node.
- 🇩🇪Germany a.dmitriiev
Hi teknocat,
Thank you for very detailed description. It really helps to understand your needs.
Workflow and content moderation has not yet been in scope for this project, but it would be really nice to have it. I would like to check this deeper.
Let's first discuss what you can do now already to make your experience better:
1. Install this module https://www.drupal.org/project/all_entity_preview → . There is a nice integration between frontend editing and it. The module allows to have the preview of your changes in the main window, while you are doing the changes in the frontend editing sidebar. This will at least help your editors to see how their changes would look like without saving the entity (paragraph or any other entity). Of course this doesn't solve all your issues but I hope it will be a good start.
2. Regarding revisions. I am a bit surprised about no revisions for the nested paragraphs even if the node requires the revision to be created every time. This part of the functionality is provided by paragraphs_edit → module, that is the dependency of frontend_editing module. When you save the paragraph there is a service that checks whether the host entity needs revision and if yes, it creates it and then goes up to the root parent (in case of nested paragraphs) and saves the root parent (most of the times it is node). I've heard couple of times about this problem from others, so this would need more attention from my side and probably some more verification to make it more stable.
3. Regarding wrong timestamp and author of node revision. This is also a bit complicated as it is not a direct feature of frontend_editing module, but paragraphs_edit. There is an issue https://www.drupal.org/project/paragraphs_edit/issues/2914976 🐛 Revisions log does not attribute author or timestamp correctly Needs work that should address this exact problem you have. The patch from the last comment applies cleanly on the latest version of the module, I use it in couple of projects myself. It would be nice if you could also test it and RTBC or give feedback in that issue, so that it is fixed in the upstream faster.
Please let me know if any of the above hints help in your case. I am willing to fix the revisions problem once and forever as it bothers me a lot. Maybe then it would be good to check the integration with workflow and content moderation as well as a follow up.
- 🇨🇦Canada teknocat
Thanks so much for the response with all the helpful information.
I installed the patch for the paragraphs edit module and that has resolved the attribution issue. Having installed that and tested editing and saving a paragraph again, I can see it creating new revisions of the parent entity.
I think I was just unable to tell if that was happening since it wasn't updating the date and author for the revision. Or, perhaps it was in fact not saving new revisions because of the issue with the date/attribution? I'm not sure, but in any case that one patch seems to fix both those issues for me.
I even tested with nested paragraphs, where I just changed the order of the sub-paragraphs without editing and even that did indeed create a new revision with the expected author and timestamp on it.
I also installed the all entity preview module and it works great! So thank you for that.
Both of these things are needed either way and the ability to preview paragraphs will cover the majority of our use cases. Until workflow/content moderation is properly integrated, we'll just have to disable front end editing for cases where content moderation has to be enforced. At least it's easy to disable access to it for specific user roles.
- 🇨🇦Canada teknocat
I'd just like to add that this module is AWESOME and just the thing we've been looking for to give content managers more of a WYSIWYG experience.
- 🇩🇪Germany a.dmitriiev
Thank you @teknocat. It is always pleasant to hear such a good feedback and suggestions. I will try to check the workflow/content moderation integration soonish.