#104603The selected directory is not stored in LinkBrowser anymore (since v12)
Description
Reproduce
1. Open link browser, e.g. by selecting text in RTE and clicking on link button
2. Open tab “File”, select a different directory
3. Switch to tab “Page“
4. switch back to tab “File”
Expected behaviour: The previously selected directory is still selected
Actual behaviour: Always, fileadmin is selected
In v11, the behaviour is as in “expected behaviour”
(2)
As above, switch to files “tab” and select a file. Create another link and open the “File” tab again. The selected folder is again reset to the default “fileadmin”.
(3) Use the button “Add media file” to open the file browser in “Text & Media” CE, change the directory there too, select a file. Open it again: Here the selected directory is stored!
Videos
current behaviour: The selection of direction in the File link browser is not stored
file_link_browser.gif
Regression
I assume this is a regression since v12, because behaviour was fine in v11.
Seems to have been inroduced with patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/78154
In particular: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78154/12/typo3/sysext/backend/Classes/LinkHandler/FileLinkHandler.php#b125
The following was removed:
if ($selectedFolder) {
// If a folder is found, store it in the session to continue where the editor left off the last time
if ($selectedFolder->checkActionPermission('read')) {
$moduleSessionData = $this->getBackendUser()->getModuleData('browse_links.php', 'ses') ?: [];
$moduleSessionData['expandFolder'] = $selectedFolder->getCombinedIdentifier();
$this->getBackendUser()->pushModuleData('browse_links.php', $moduleSessionData);
}
Versions
Tested with
- latest “main” branch (v14)
- lastest 13.4 branch
- latest 12.4 branch
Not reproducible with version 11