-
- Downloads
[FIX] website: prevent deadlock on editor restart
Before this commit, a deadlock caused the editor not to restart
correctly when there is an invisible element on a page. The error is
visible by following these steps:
- Edit a website page
- Click on the footer
- Toggle off the page visibility option
- Click on the navbar
- Change the template
- The editor has to restart so click on "OK"
=> The Odoo top bar stays in edit mode and the user is not able to
modify the page.
Technical information:
When entering edit mode via the URL (enable_editor) the `WebsiteNavbar`
is not yet `ReadyForActions` because it is waiting for its sub-component
`EditPageMenu` to start edit mode. Then invisible snippets options start
(so the `VisibilityPageOptionUpdate` too). But for `isShown()` to work,
the navbar must be `ReadyForActions`. This is the reason why we can't
await for `isShown()` in the start of the option, otherwise we would
have a deadlock. On one hand the `WebsiteNavbar` waiting for the
invisible snippets options to be started to be `ReadyForActions` and on
the other hand the `VisibilityPageOptionUpdate` option which needs the
`WebsiteNavbar` to be `ReadyForActions` to be started.
Related to opw-2971181
closes odoo/odoo#103783
Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
Loading