Bug #93893
closedLink Browser has lost anchor (v10)
100%
Description
In previous TYPO3 versions, when interacting with the page tree in the link browser,
the view automatically jumped back to the place the user interacted with.
This was done by appending an anchor to the URL.
In v10 however, that anchor is no longer being appended to the URL, requiring the user
to manually scroll back to where he was after every click.
The commit introducing this regression was
https://github.com/TYPO3/TYPO3.CMS/commit/04ea328d3f48e680317262f574e3a64abfbc93b8#diff-685d7fdf62249bd66af85c892aa016d39419ba3b0c158d166faff693a2a885c5
As the $anchor variable is still present, the fix is as trivial as appending it to the URL again.
sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php::PM_ATagWrap()
return '<a class="list-tree-control ' . ($isOpen ? 'list-tree-control-open' : 'list-tree-control-closed')
. '" href="' . htmlspecialchars($this->getThisScript() . HttpUtility::buildQueryString($urlParameters)) . '"' . htmlspecialchars($name) . '><i class="fa"></i></a>';
=>
return '<a class="list-tree-control ' . ($isOpen ? 'list-tree-control-open' : 'list-tree-control-closed')
. '" href="' . htmlspecialchars($this->getThisScript() . HttpUtility::buildQueryString($urlParameters)) . $anchor . '"' . htmlspecialchars($name) . '><i class="fa"></i></a>';
Files
Updated by Stefan Hekele over 3 years ago
- File LinkBrowserAnchor.patch LinkBrowserAnchor.patch added
Updated by Xavier Perseguers over 3 years ago
Wanted to help you and send your patch to review.typo3.org but any patch should be sent to master as well for such case. However I cannot find a "anchor" variable in \TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView::PM_ATagWrap() from master branch.
Would you mind investigating first if that dangling variable in v10 has somehow been removed/cleaned-up in v11/master branch and should thus be reintroduced so that your bugfix patch can be applied to both v11 and v10 and we ensure we are not fixing something in v10 that is already broken again in v11?
Updated by Stefan Hekele over 3 years ago
Thanks for the feedback. Looking at the master commit history, the variable was indeed removed due to dead code cleanup ([TASK] Drop a series of unused code occurences): https://github.com/TYPO3/TYPO3.CMS/commit/ceb903264c3f34852b87c6e61c47a90e86106600#diff-685d7fdf62249bd66af85c892aa016d39419ba3b0c158d166faff693a2a885c5
Updated by Benni Mack about 3 years ago
- Status changed from New to Needs Feedback
Is this issue resolved with TYPO3 v11?
Updated by Stefan Hekele about 3 years ago
Purely looking at the v11 & master code, no. The snippet is still completely identical.
I have not yet spun up a v11 instance to know with absolute certainty.
Updated by Gerrit Code Review almost 3 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72935
Updated by Gerrit Code Review almost 3 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72935
Updated by Gerrit Code Review almost 3 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72975
Updated by Benni Mack almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9f968c376f10dafc27458190a58abe5ccf83ffea.