LinkBrowser requests incorrect URL when switching tabs during loading process
The LinkBrowser in TYPO3 v8 and v9 requests an incorrect URL when switching tabs. The problem occurs when a user switches from one to another tab if the page/resources haven't been loaded completely.
AbstractLinkBrowserController->buildMenuArray(), the href is set to # and the
onclick="jumpToUrl(url)" argument will be used to navigate to another tab in the LinkBrowser.
I've managed to reproduce this bug on several installations and TYPO3 versions of our customers and on my local ddev TYPO3 installation.Steps to reproduce the problem:
- Open the inspector and throttle your connection. It's not necessary, but comes in handy if you have a fast connection or if your website contains just a few files in your filelist/filemount
- Add a new content element, for example the Regular Text element
- Use the Link Browser for the header link or inside the RTE to insert a link to the element
- Try switching tabs before the page is completely loaded or during loading process
- You should now hopefully get an error in your Link Browser
It's quite a difficult problem to reproduce. I couldn't always get to reproduce the error.
What I tried on some of the installations is applying the little block of code that has changed in issue #89033. TYPO3 v8 compared to v9 and v10 has minor differences according to building the url, but with some modifications I could get it to work with that version too. Applying this code solved the problem in our case.
#3 Updated by Gerrit Code Review 2 days ago
- Status changed from New to Under Review
Patch set 1 for branch 9.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/+/62344
#4 Updated by Gerrit Code Review about 11 hours ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62356