- 🇳🇿New Zealand john pitcairn
As a site editor, I would always expect reverting to discard any layout changes. I want the content and layout in sync on revert.
I cannot imagine a situation where not doing so makes any sense, and I imagine legal might take a fairly dim view of anything otherwise occurring.
- First commit to issue fork.
- Merge request !6959Draft: Don't use the temp store section storage if it was created on a different revision. → (Open) created by amateescu
- Status changed to Needs work
8 months ago 4:26pm 7 March 2024 - 🇷🇴Romania amateescu
I also bumped into this recently, so here's a MR to get things rolling. The approach I've taken is to skip using section storage from the temp store if the revision IDs of the entities don't match.
What's left to do:
- in\Drupal\layout_builder\EventSubscriber\PrepareLayout::onPrepareLayout()
, detect this situation and change the message from "You have unsaved changes." to something like "You have unsaved changes in a different version of your content. Click here to view it.", where "Click here" would be a link to the current route with a param query appended (enforce_temp_store=1
or something), that would swap the section storage with the one from temp store (the current behavior in HEAD)
- test coverage - 🇮🇳India amarlata
I followed the all step https://www.drupal.org/project/drupal/issues/3204494#comment-14099699 🐛 Content Not reverting in Layout builder section Active and I am able to reproduce this error in 10.1.8