Skip to content
Snippets Groups Projects
Commit eee662af authored by Andreas Kienast's avatar Andreas Kienast
Browse files

[BUGFIX] Do not race tree node loading

When (de-)mounting pages in the page tree, always two requests are sent
to the server that fetch the tree data:

* when the `mountPointPath` path property is changed as it's a state
  property
* explicitly after changing said property

Especially when de-mounting a page, this tends to race conditions, as
the mount state is additionally stored in the backend user's UC that
needs to get unset as well.

This bugfix now changes the handling when the state property, that
triggers a re-rendering of the tree component, is updated. The
de-mounting process now unsets the backend user's UC first and then
changes the property to make sure that

1. the state is updated once the configuration is flushed
2. the tree nodes are fetched only once

In the mounting process, the UC is correctly updated first. However, the
state was updated and then the nodes were reloaded explicitly. The
latter is not required at all.

Resolves: #103185
Releases: main, 12.4
Change-Id: I7a06852c6af40e1a41691a7cc7acd41db4f84adc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83126


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Tested-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
parent 4fda3505
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment