Bug #51649
closedLong paths to files cause errors
0%
Description
If you use very long paths to store your images and files, functions will break, e. g. in the frontend the image rendering and click-enlarge function and in the backend the "edit" function.
How to reproduce this bug:
- Install a fresh TYPO3 CMS 6.1.3 introduction package
- Create the following folder structure using the "File" module in the "fileadmin" storage:
/this_is_my_first_folder/>this_is_my_second_folder/>this_is_my_third_folder/
-
--->this_is_my_fourth_folder/
---->this_is_another_really_long_folder_name_which_may_cause_problems/
- Upload an image to the deepest folder.
- Add that folder to an image content element in the frontend.
The image will not be rendered, neither the thumbnail in the backend. Also, if you try to edit that file record in the backend, you'll get an Exception. A part of file name in the error message is cut off.
Uncaught TYPO3 Exception #1314516809: File /this_is_my_first_folder/this_is_my_second_folder/this_is_my_third_folder/this_is_my_fourth_folder/this_is_another_really_long_folder_name_which_may_cause_problems/15_20_12---Waterfall--Pistyll-Rhaead does not exist. (More information) InvalidArgumentException thrown in file [...]introductionpackage-6.1.3/typo3_src-6.1.3/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php in line 237.
Updated by Christian Buelter almost 11 years ago
The second folder in the example is crossed out, that was not my intention, it should be
/this_is_my_first_folder/
this_is_my_second_folder/
this_is_my_third_folder/
this_is_my_fourth_folder/
this_is_another_really_long_folder_name_which_may_cause_problems/
Updated by Philipp Gampe almost 11 years ago
This happens, because the field for the image references inside the tt_content record is too short. Currently this the full path is used as identifier. AFAIK this is subject to change.
Anyway, you can work around this bug by changing the field type to text in the tt_content and maybe also in the sys_file table.