volto icon indicating copy to clipboard operation
volto copied to clipboard

Fix race condition in rendering the toolbar in multilingual sites after saving a page

Open pnicolli opened this issue 1 year ago • 2 comments

This happens very rarely but we saw it happen in production. The PATCH to the server goes through and the saving happens, then the user is rerouted to the view, the content reducer is reset and if the rendering happens at that time, before the GET response comes, the view breaks.

Also, in this PR is a minor fix for the content reducer that currently loses locking info when the GET_CONTENT_SUCCESS action comes.

pnicolli avatar Sep 27 '22 10:09 pnicolli

Deploy Preview for volto canceled.

Name Link
Latest commit 080cd7196cd4390a97f9df7966d99516105a3454
Latest deploy log https://app.netlify.com/sites/volto/deploys/63d313224221bb00085da6c6

netlify[bot] avatar Sep 27 '22 10:09 netlify[bot]

I tried to fix that also, but it turns out the lock mechanism is broken (see tests). Maybe we should revisit it and rethink it again.

sneridagh avatar Sep 27 '22 13:09 sneridagh

We have faced this too.

erral avatar Nov 09 '22 08:11 erral

I tried to fix that also, but it turns out the lock mechanism is broken (see tests). Maybe we should revisit it and rethink it again.

@sneridagh Yes it could probably benefit from a rework, but I believe that a very small fix like this could be released in the meantime. This is still breaking multilingual sites from time to time, when I forget to backport this customization to new clients.

I am now running tests again to see if something is missing in order to be mergeable.

pnicolli avatar Dec 29 '22 11:12 pnicolli

Closing because fixed in #4377

pnicolli avatar Feb 16 '23 09:02 pnicolli