Project

General

Profile

Actions

Bug #93893

closed

Link Browser has lost anchor (v10)

Added by Stefan Hekele about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2021-04-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:

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

LinkBrowserAnchor.patch (821 Bytes) LinkBrowserAnchor.patch Stefan Hekele, 2021-04-09 11:21
Actions #2

Updated by Stefan Hekele about 3 years ago

  • Description updated (diff)
Actions #3

Updated by Xavier Perseguers about 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?

Actions #4

Updated by Stefan Hekele about 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

Actions #5

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback

Is this issue resolved with TYPO3 v11?

Actions #6

Updated by Stefan Hekele over 2 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.

Actions #7

Updated by Gerrit Code Review over 2 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

Actions #8

Updated by Gerrit Code Review over 2 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

Actions #9

Updated by Gerrit Code Review over 2 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

Actions #10

Updated by Benni Mack over 2 years ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF