Bug #83712
closedPrevention of deleting images from filelist, referenced in flexform sections, is not working
0%
Description
When you use an image from FAL in a regular TCA column or in a flexform directly, you can't delete the image from filelist:
It's protected.
When you use the TCA field type="group"
with appearance -> elementBrowserType: file, instead of inline, the reference is basically recognized from the system:
But when deleting the file this reference is not respected anymore.
All other references (regular TCA column, e.g.) are respected!
This is a flexform field configuration, which allows to reconstruct the issue:
<config> <type>group</type> <internal_type>db</internal_type> <appearance> <elementBrowserType>file</elementBrowserType> <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</elementBrowserAllowed> </appearance> <allowed>sys_file</allowed> <size>5</size> <minitems>0</minitems> <maxitems>5</maxitems> <show_thumbs>1</show_thumbs> <dce_load_schema>1</dce_load_schema> <dce_get_fal_objects>1</dce_get_fal_objects> </config>
Files
Updated by Armin Vieweg almost 7 years ago
- File 2018-01-29_1250.png 2018-01-29_1250.png added
Okay. I've found the reason (in EXT:core/Classes/Utility/File/ExtendedFileUtility.php:428):
foreach ($refIndexRecords as $fileReferenceRow) { if ($fileReferenceRow['tablename'] === 'sys_file_reference') { // ... } }
So the check for references is just executed for real FAL references, at this point. So this is ignored:
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55486
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55486
Updated by Gerrit Code Review almost 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55486
Updated by Gerrit Code Review almost 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55486
Updated by Gerrit Code Review almost 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55486
Updated by Frank Nägler almost 7 years ago
The current implementation bypass sys_file_reference and works against the FAL concept. A solution must respect the FAL concept, sys_file can't have a direkt relation to other records. only with a reference in sys_file_reference. group/DB without MM config works with a comma list, and is not compatible with FAL.
Updated by Frank Nägler almost 7 years ago
- Status changed from Under Review to Rejected