Bug #99516
openEditors can't delete or disable file references attached to sys_file_metadata
0%
Description
Adding a sys_file_reference via TCA Overrides to the sys_file_metadata table.
Editors (Non-Admin) can add the reference but they can't disable or remove them.
For example:
"Add a poster image to video files"
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_file_metadata', [
'poster' => [
'exclude' => 0,
'label' => 'Poster Image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('poster', [
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:media.addFileReference',
'collapseAll' => true,
],
'behaviour' => [
'allowLanguageSynchronization' => true
],
'overrideChildTca' => [
'types' => [
'0' => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette'
],
],
'columns' => [
'link' => false,
'description' => false,
'alternative' => false,
'title' => false,
],
],
'maxitems' => 1,
'minitems' => 0,
],
'jpg,png,svg'
)
],
]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes($table,
'poster',
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO,
'after:duration');
The sys_file_reference is stored on pid=0 which shouln't be a problem, since sys_file_reference has
'security' => [
'ignoreWebMountRestriction' => true,
'ignoreRootLevelRestriction' => true,
],
in the ctrl section.
Another example:
https://github.com/thomasrawiel/video-vtt/blob/main/Configuration/TCA/Overrides/sys_file_metadata.php
Related:
https://forge.typo3.org/issues/75332
A decision was announced to merge sys_file and sys_filemetadata but that was 5 years ago
https://forge.typo3.org/issues/81308#change-356775
Please reevaluate this problem.
Files
Updated by Georg Ringer 9 months ago
- Related to Bug #75332: Saving relations to files in sys_file_metadata does not work for normal users added
Updated by Georg Ringer 9 months ago
- Related to Bug #81308: Deleting a referenced file via filelist module, definined in sys_file_metadata added
Updated by Gerrit Code Review 9 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85110
Updated by Jens Jacobsen 7 months ago
- Related to Bug #77487: File references to file metadata cannot be deleted added
Updated by Jens Jacobsen 7 months ago
- File Bildschirmfoto 2024-08-08 um 14.24.28.png Bildschirmfoto 2024-08-08 um 14.24.28.png added
- File Bildschirmfoto 2024-08-08 um 14.23.14.png Bildschirmfoto 2024-08-08 um 14.23.14.png added
- TYPO3 Version changed from 10 to 12
- PHP Version changed from 7.4 to 8.3
Update TYPO3 version and PHP Version, bug is still present in 12.4 LTS.
Updated by Gerrit Code Review 5 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85110
Updated by Ernesto Baschny 2 months ago
Same problem applies to the other "icons" which the admin sees but an editor not: hide/unhide, sort.up, sort.down.
I needed this fix for an older v11 installation, so I created a patch for it for our own projects - https://github.com/baschny/typo3/pull/2
If there is interest, I could update the open review from @Georg Ringer (https://review.typo3.org/c/Packages/TYPO3.CMS/+/85110) to add the missing icons to the newer v13+ patch too (before it gets merged).
Updated by Gerrit Code Review about 1 month ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85110