Bug #57163

Epic #57533: Pagetree epic

Pagetree unfold wrong page whith multiple mount points

Added by Alexander Stehlik about 6 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Pagetree
Target version:
-
Start date:
2014-03-21
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Associated revisions

Revision e9a47906 (diff)
Added by Alexander Stehlik almost 6 years ago

[BUGFIX] Unique IDs for pagetree root nodes

To make sure that every ID in the pagetree is unique in pagetrees
with a virtual root node (which is used for normal editors) the
page UIDs of the webmounts are set in the mountpoint property of
the tree nodes. This makes sure that all tree node ids are unique.

Resolves: #57163
Releases: 6.3, 6.2
Change-Id: Ia938a9bf4839524d60056d55c0186196dbd11289
Reviewed-on: https://review.typo3.org/28616
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 8c58f8cf (diff)
Added by Alexander Stehlik almost 6 years ago

[BUGFIX] Unique IDs for pagetree root nodes

To make sure that every ID in the pagetree is unique in pagetrees
with a virtual root node (which is used for normal editors) the
page UIDs of the webmounts are set in the mountpoint property of
the tree nodes. This makes sure that all tree node ids are unique.

Resolves: #57163
Releases: 6.3, 6.2
Change-Id: Ia938a9bf4839524d60056d55c0186196dbd11289
Reviewed-on: https://review.typo3.org/31246
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Alexander Stehlik about 6 years ago

This is only reproducible for non-admins.

For administrators this seems to work fine.

#2 Updated by Alexander Stehlik about 6 years ago

I just realized the IDs are still identical. No wonder this does not work :(

#3 Updated by Gerrit Code Review about 6 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

#4 Updated by Felix Kopp about 6 years ago

  • Parent task set to #57533

#5 Updated by Gerrit Code Review almost 6 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

#6 Updated by Gerrit Code Review almost 6 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

#7 Updated by Alexander Stehlik almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF