Project

General

Profile

Actions

Bug #83712

closed

Prevention of deleting images from filelist, referenced in flexform sections, is not working

Added by Armin Vieweg almost 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2018-01-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

2018-01-29_1159.png (5.9 KB) 2018-01-29_1159.png Armin Vieweg, 2018-01-29 12:01
2018-01-29_1203.png (4.75 KB) 2018-01-29_1203.png Armin Vieweg, 2018-01-29 12:03
2018-01-29_1250.png (67.8 KB) 2018-01-29_1250.png Armin Vieweg, 2018-01-29 12:50
Actions #1

Updated by Armin Vieweg almost 7 years ago

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:

Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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.

Actions #8

Updated by Frank Nägler almost 7 years ago

  • Status changed from Under Review to Rejected
Actions

Also available in: Atom PDF