Project

General

Profile

Actions

Bug #77749

closed

Bug #71298: Fix missing/broken RTE features after Link Handler API merge

Link Wizard does not work after creating a folder

Added by Robert Vock over 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2016-09-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

The link wizard beside an input field opens a popup which gets a fieldChangeFunc parameter to change a field via javascript. This parameter can get lost when certain actions are performed within the popup. When the parameter is lost, selecting anything in the popup will not change the field in the opener document.

Steps to reproduce:
1. Open the Link Browser using the wizard link

2. Go to folder tab
3. Create a new folder
4. Try to click on anything to generate a link

This bug affects the linkhandler extension which shows a list-view in the popup.

The source for this bug is within LinkBrowserController:
https://github.com/TYPO3/TYPO3.CMS/blob/d4ef7b/typo3/sysext/backend/Classes/Controller/LinkBrowserController.php#L68

During initDocumentTemplate the fieldChangeFunc-array will be changed without adjusting the fieldChangeFuncHash. When a link uses the fieldChangeFunc-parameter, it will get invalidated because of the incorrect hash.


Files

link-wizard.png (4.98 KB) link-wizard.png Robert Vock, 2016-09-01 15:07
cattura1.png (160 KB) cattura1.png Riccardo De Contardi, 2020-02-08 00:19
cattura2.png (146 KB) cattura2.png Riccardo De Contardi, 2020-02-08 00:22
cattura3.png (28.1 KB) cattura3.png Riccardo De Contardi, 2020-02-08 00:26
Actions #1

Updated by Robert Vock over 7 years ago

After further investigation, I found, that changing initDocumentTemplate would only fix the linkhandler extension, which relies on the parameters and appends them in URLs.

The problem with the Link Browser popup and creating a folder would still exist. This would need a more complex fix.
One solution would be to add the fieldChangeFunc parameter in the action url of the form for creating a folder / uploading a file.

Another fix would be to send an event to the opener-window instead of using parameters of the opener window to find the form element there.

Actions #2

Updated by Markus Klein over 7 years ago

  • Parent task set to #71298

Is this affecting version 7 as well?

Actions #3

Updated by Markus Klein over 7 years ago

  • Assignee set to Markus Klein
Actions #4

Updated by Robert Vock over 7 years ago

Yes TYPO3 7.6 is affected as well.

It works correctly in TYPO3 6.2

Actions #5

Updated by Robert Vock over 7 years ago

Just a note: This bug is still present with 7.6.13 and not fixed with #75743

Actions #6

Updated by F Altrock over 7 years ago

The problem lies in the fact that all the forms in the file tab of the link browser (creating a folder, uploading a file, adding a media asset) have a faulty
redirect value. See here https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/recordlist/Classes/View/FolderUtilityRenderer.php#L81

After form submission TYPO3 redirects to that URL, and the parameters to figure out which form input to update in the parent window are lost.
They are computed here: https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php#L593
A possible fix would be to extend FileLinkHandler::getUrlParameters https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php#L313 to return these add-on parameters as well.

Actions #7

Updated by Markus Klein over 7 years ago

Thanks for investigating. Do you have a patch at hand already? If so, please push it to Gerrit and add me as reviewer. Thanks.

Actions #8

Updated by Markus Klein over 7 years ago

  • TYPO3 Version changed from 8 to 7
Actions #9

Updated by Markus Klein over 7 years ago

  • Status changed from New to Accepted
  • Priority changed from Should have to Must have
  • Target version set to Candidate for patchlevel
  • Complexity set to medium
Actions #10

Updated by Riccardo De Contardi about 7 years ago

Affects also 8.7.1-dev (latest master) AFAICS

Updated by Riccardo De Contardi about 4 years ago

I tried to reproduce this issue on 10.3.0-dev, 9.5.13 and 8.7.30 with the following test

1) Create a content element e.g. Header
2) click on "Headlines - link" (header_link) to get the link wizard
3) go to "Folder" tab and create a new folder:

4) Click on the freshly created folder:

Please note that you have to click there and not on the folders on the left folder tree! they're behave the same way as the folder tree on the "File" folder: you use it to select the folder and then you use the list on the right (the one with the arrow) to select the object to be linked

Result: the link gets saved:

I also tried with changing tab and selecting for example a page link or file link, but it still works

I therefore close this issue; if you think that this is the wrong decision or experience the issue again or think that my test is wrong, please reopen it or open a new issue with a reference to this one, including a step-by-step tutorial about how to reproduce the issue.

Thank you.

Actions #12

Updated by Robert Vock about 4 years ago

Thanks for testing. It must have been fixed with the new link wizard in TYPO3 v8.

Actions

Also available in: Atom PDF