Bug #92312

sys_file_metadata.filelist is in TCA but not in SQL schema - may lead to exceptions

Added by Sybille Peters 11 days ago. Updated 11 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2020-09-15
Due date:
% Done:

0%

TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

System

  • 9.5.20
  • master (11-dev)

I had the problem in 9.5.20 but the same seems to apply for master

Sideeffects

If l10nmgr is installed and a non-admin edits the file metadata in the filelist, an exception may occur.

Oops, an error occurred!
An exception occurred while executing 'SELECT `crdate`, `sys_language_uid`, `l10n_parent`, `l10n_diffsource`, `t3ver_label`, `fileinfo`, `file`, `title`, `description`, `alternative`, `width`, `height`, `categories`, `visible`, `status`, `keywords`, `caption`, `creator_tool`, `download_name`, `creator`, `publisher`, `source`, `copyright`, `location_country`, `location_region`, `location_city`, `latitude`, `longitude`, `ranking`, `content_creation_date`, `content_modification_date`, `note`, `unit`, `duration`, `color_space`, `pages`, `language`, `fe_groups`, `t3_origuid`, `uid`, `pid`, `sys_language_uid`, `l10n_diffsource`, `l10n_parent` FROM `sys_file_metadata` WHERE (`uid` = ?) AND (`sys_language_uid` <= ?) AND ((`sys_file_metadata`.`t3ver_wsid` = 0) OR (`sys_file_metadata`.`t3ver_state` <= 0))' with params [162820, 0]: Unknown column 'fileinfo' in 'field list'

Because the extensions l10nmgr reads the fields from TCA and contructs the SQL query from that. If user is admin, it just uses "*".

More info:

$ mysql -e "describe sys_file_metadata" t3coredev | grep fileinfo

no result.

  • sys_file_metadata.filelist is defined in TCA (EXT:core)
  • EXT:l10nmgr:\Localizationteam\L10nmgr\Model\Tools->getSingleRecordToTranslate() : DB query

exception.log View (34.4 KB) Sybille Peters, 2020-09-15 14:43


Related issues

Related to TYPO3 Core - Bug #46187: Missing columns sys_file.fileinfo and sys_file_meta.fileinfo Closed 2013-03-11

History

#1 Updated by Sybille Peters 11 days ago

It would help to enable "exclude" for sys_filemetadata.fileinfo:

'fileinfo' => [
            'exclude' => true,
            'config' => [
                'type' => 'user',
                'renderType' => 'fileInfo',
            ]
        ],

#2 Updated by Sybille Peters 11 days ago

  • Related to Bug #46187: Missing columns sys_file.fileinfo and sys_file_meta.fileinfo added

#3 Updated by Sybille Peters 11 days ago

The extension l10nmgr probably should not just SELECT all fields from TCA. But fileinfo is of type "user" which should have a DB field. At least it says so in the TCA docs:

Unlike none, type user must have a database field.

https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/User.html#introduction

Also available in: Atom PDF