Bug #57163
closedEpic #57533: Pagetree epic
Pagetree unfold wrong page whith multiple mount points
100%
Description
How to reproduce:
Create a pagetree:
- Page 1
- Page 1.1
- Page 1.1.1
Create a user with two database mounts:
- Page 1
- Page 1.1
Now when you unfold Page 1 (and Page 1.1 gets visible as a child node) you get this strange behavior:
When you place your mouse over the Page 1.1 database mount page, the subpage of Page 1 will be highlighted.
When you unfold the Page 1.1 database mount, the page below Page 1 will be unfolded, not the one you clicked on.
The behavior of the child nodes of the Page 1.1 database mount is the same.
Things i've tried¶
I was looking at the ext:tree-node-id
property and realized that it is the same for both nodes. This is why I set the mountpoint in the child nodes:
--- typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php +++ typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php @@ -155,6 +155,9 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider { // must be calculated above getRecordWithWorkspaceOverlay, // because the information is lost otherwise $isMountPoint = $subpage['isMountPoint'] === TRUE; + if ($isMountPoint && $mountPoint === 0) { + $mountPoint = (int)$subpage['uid']; + } $subpage = $this->getRecordWithWorkspaceOverlay($subpage['uid'], TRUE); if (!$subpage) { continue;
This resulted in unique tree nodes, looking like this:
<div ext:tree-node-id="p2725-271d" class="x-tree-node-el x-unselectable x-tree-node-collapsed" unselectable="on" id="extdd-13"> ... </div>
But it did not help. Still the same behavior.
I also removed all custom code from typo3/js/extjs/components/pagetree/javascript/nodeui.js
so that the native rendering of ExtJS is used but this did not help either.
No idea where to look next. Any help is appreciated.
Updated by Alexander Stehlik over 10 years ago
This is only reproducible for non-admins.
For administrators this seems to work fine.
Updated by Alexander Stehlik over 10 years ago
I just realized the IDs are still identical. No wonder this does not work :(
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28616
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28616
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31246
Updated by Alexander Stehlik over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8c58f8cfba063254d963401078db4dec1ea71e3e.