Bug #77749
closedBug #71298: Fix missing/broken RTE features after Link Handler API merge
Link Wizard does not work after creating a folder
0%
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
Updated by Robert Vock about 8 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.
Updated by Markus Klein about 8 years ago
- Parent task set to #71298
Is this affecting version 7 as well?
Updated by Robert Vock about 8 years ago
Yes TYPO3 7.6 is affected as well.
It works correctly in TYPO3 6.2
Updated by Robert Vock about 8 years ago
Just a note: This bug is still present with 7.6.13 and not fixed with #75743
Updated by F Altrock almost 8 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.
Updated by Markus Klein almost 8 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.
Updated by Markus Klein almost 8 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
Updated by Riccardo De Contardi over 7 years ago
Affects also 8.7.1-dev (latest master) AFAICS
Updated by Riccardo De Contardi almost 5 years ago
- File cattura1.png cattura1.png added
- File cattura2.png cattura2.png added
- File cattura3.png cattura3.png added
- Status changed from Accepted to Closed
- Assignee deleted (
Markus Klein) - Target version deleted (
Candidate for patchlevel)
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.
Updated by Robert Vock almost 5 years ago
Thanks for testing. It must have been fixed with the new link wizard in TYPO3 v8.