Bug #71298: Fix missing/broken RTE features after Link Handler API merge
Link Wizard does not work after creating a folder
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:
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.
#1 Updated by Robert Vock almost 3 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.
#6 Updated by F Altrock over 2 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.