Bug #89619

LinkBrowser requests incorrect URL when switching tabs during loading process

Added by Dennis Prinse 7 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-11-08
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.

In AbstractLinkBrowserController->buildMenuArray(), the href is set to # and the onclick="jumpToUrl(url)" argument will be used to navigate to another tab in the LinkBrowser.

This behaviour has changed in TYPO3 10 (master). The jumpToUrl function has been marked deprecated (see issue #89033) and the href is set to the url instead of a #. Switching tabs is no longer dependent of JavaScript in the changed implementation.

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.


Related issues

Related to TYPO3 Core - Task #89033: Deprecate jumpToUrl Closed 2019-08-28

Associated revisions

Revision 3a814b6f (diff)
Added by Dennis Prinse 6 months ago

[BUGFIX] Remove jumpToUrl function in LinkBrowser

This patch backports the changes in AbstractLinkBrowserController
which were added in patch #89033.

Before, the AbstractLinkBrowserController added a href=#
and an onclick=jumpToUrl() which triggered JavaScript to switch
tabs. In this patch, the onclick=jumpToUrl() function will
be removed from a tab and complete url will be set to the tab
instead.

The onclick=jumpToUrl() function caused problems when switching
tabs while resources were loading.

Resolves: #89619
Related: #89033
Releases: 9.5
Change-Id: Ib16f86ddab8ca47e492b4ef5bb730cd73b6b5220
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62344
Tested-by: Andreas Fernandez <>
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Richard Haeser <>

Revision 3194634a (diff)
Added by Dennis Prinse 3 months ago

[BUGFIX] Remove jumpToUrl function

This patch backports the changes in AbstractLinkBrowserController
which were added in patch #89033. There were some differences
between master and the 8.7 branch, so some adjustments had to be
made to backport the patch properly.

Before, the AbstractLinkBrowserController added a href=#
and an onclick=jumpToUrl() which triggered JavaScript to switch
tabs. In this patch, the onclick=jumpToUrl() function will
be removed from a tab and complete url will be set to the tab
instead.

The onclick=jumpToUrl() function caused problems when switching
tabs while resources were loading.

Resolves: #89619
Releases: 8.7
Change-Id: I75562d73ce91f72fc67ac79bf01f4b231dddbe4c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62356
Tested-by: Richard Haeser <>
Tested-by: TYPO3com <>
Tested-by: Markus Klein <>
Tested-by: Benni Mack <>
Reviewed-by: Richard Haeser <>
Reviewed-by: Markus Klein <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Dennis Prinse 7 months ago

  • Subject changed from LinkBrowser request incorrect URL when switching tabs during loading process to LinkBrowser requests incorrect URL when switching tabs during loading process

#2 Updated by Richard Haeser 6 months ago

  • TYPO3 Version changed from 8 to 9

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

#5 Updated by Gerrit Code Review 6 months ago

Patch set 2 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

#6 Updated by Gerrit Code Review 6 months ago

Patch set 2 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

#7 Updated by Gerrit Code Review 6 months ago

Patch set 3 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

#8 Updated by Anonymous 6 months ago

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

#9 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

#10 Updated by Gerrit Code Review 4 months ago

  • Status changed from Closed to Under Review

Patch set 3 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

#11 Updated by Markus Klein 3 months ago

#12 Updated by Anonymous 3 months ago

  • Status changed from Under Review to Resolved

#13 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF