Closed GlennRicaud closed 6 years ago
The problem is a bit more complex than I thought.
First of all, it's not a bug only in Version history widget. It displays just the right thing. And the reason it doesn't update widget on deselect & select is due to optimizations because there is no need to fetch the content from the server again.
Second, if you save the content with a different name and then restore the snapshot, the name/path won't change. Or if you delete the content and then try to restore it, it won't appear, unless you reload the grid.
And the main problem is that no server events are generated in response to snapshot restoration. The client simply doesn't know the content was updated. I believe, we just need an implementation of that server events in XP or Data Toolbox app.
Agreed with the event sent on snapshot restore.
There is already a "backend" event sent on snapshot: "repository.restored" But the websocket of the admin UI does not seem to send it and the Admin apps do not handle it I guess. Not sure how much work it is and if it would have a big impact (you should basically refresh everything).
Ok, I'll take a look at that event then.
Issue moved to enonic/lib-admin-ui #383 via ZenHub
Have a content
Take a snapshot
Edit the content and display the version history widget. -> The widget displays the new version
Keep the tab opened and restore the snapshot
Unselect and select the content -> The widget still display the new version
Select another content and select back the content -> The widget has the correct display now