- Issue created by @matoeil
- 🇩🇪Germany a.dmitriiev
Please provide more details. Frontend editing uses paragraphs_edit module, that controls the usage of revisions. Normally, if the root parent (the top most parent), like node for example, requires new revision, then the paragraph also requires new revision and then the whole chain of parents is saved with new revision.
- Status changed to Postponed: needs info
about 1 year ago 2:10pm 10 November 2023 - 🇩🇪Germany a.dmitriiev
Reverting to an old revision erase all modifications that would have been done with front place editing !
I don't understand, first you say that frontend editing doesn't support revisions. With this statement you say, that if you revert to older revisions, you don't see the changes that were done by frontend editing. Isn't it a proof that frontend editing supports revisions? So try to go forward again to the latest revision, are you changes there?
- Status changed to Active
about 1 year ago 3:09pm 14 November 2023 - 🇫🇷France matoeil
to precise #3:
if using back-office editing , a revision is created each time a modification is made
if using front end editing , a revision is, in certain cases, not created.If someone revert a revision, all modif that would have been done without revision are lost.
That is why i have considered it critical. - 🇫🇷France matoeil
i have looked more thoroughly on our use case.
We do use a lot of entity ref fields and i can spot at least 2 problemsif having a content type let's say 'page' , having a paragraph entity ref field, having a view ref field displaying a list of content, let s say 'articles' with their respective fields.
when using front editing here to edit the article, the article is revisioned, but the page is not.if having a content type , lets say 'article', having a media ref field
when using front editing here to update the media, the article is not revisionedI am editing the issue
- 🇩🇪Germany a.dmitriiev
To sum it up, when editing paragraph with frontend editing, then revision is created, but when editing media or any other entity type, then revision is not created? Correct?
- 🇩🇪Germany a.dmitriiev
if having a content type let's say 'page' , having a paragraph entity ref field, having a view ref field displaying a list of content, let s say 'articles' with their respective fields.
when using front editing here to edit the article, the article is revisioned, but the page is not.The parent page is not connected with the article that is revisioned by view reference field in any way, so it is not possible that frontend editing knows that parent page needs revision. I am not sure that this is also possible when using the backoffice in normal Drupal UI. Parent page has its own revisions, article referenced with view has its own revisions, and those both revisions are not connected in any way. Please explain how you see this connection? If in your case the backoffice creates revision anyway, please describe what widgets are you using?
if having a content type , lets say 'article', having a media ref field when using front editing here to update the media, the article is not revisioned
Media entity reference field normally uses entity reference field type, this type doesn't support revisions. So it is always referencing the latest revision. This is limitation of field type, not frontend editing. The paragraph entity type in contrary uses entity reference revisions field type. This type supports referencing specific revision, that is why when you update paragraph it creates new revision (if necessary) and also creates the revision to the host entity of the paragraph, but not in case of media, that uses normal entity reference field type. Once again, this is not limitation of frontend editing module, this is how entity reference field from core works.
If you still have different bevavior in your admin UI backoffice, please give more details of what widgets are you using and what field types.
- 🇩🇪Germany a.dmitriiev
When you edit media through frontend editing, it is not opening the node form with referenced media, it opens only the media edit form. It is the same as if you would open the
media/123/edit
page (where 123 is the media id, that you are editing). Of course in this case there is no way to update the parent entity, as if you go tomedia/123/edit
and do changes to it, it doesn't update all the nodes, that reference that entity (and not create revisions too).When you edit paragraph, it is a bit differently, as paragraph itself on its entity level has the reference to the host entity that contains this paragraph, that is why it is possible to trigger the update for the host (parent) entity as well, when paragraph is updated.
It could be a feature request, to trigger the revision creation for parent entity, when media is updated (in case media reference is a direct child of node via entity reference field). I will check if this is possible to implement. But for the article that is referenced through view reference, that might be not possible at all.