Bug #94607

TcaMigration for special-value type-field in sys_file_reference triggers exception

Added by Stefan Neufeind 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-07-21
Due date:
% Done:

0%

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

Description

For sys_file_reference the type-field does not point to a configured field directly. So TcaMigration complains with an exception.

I don't exactly know why in my special case the TCA-migration triggered checks. But imho it might simply skip checking such "special values"?

Uncaught TYPO3 Exception #1482394401: Missing "type" in TCA of field "['sys_file_reference']['uid_local:type']['config']".
thrown in file /var/www/typo3_src-10.4.17/typo3/sysext/core/Classes/Migrations/TcaMigration.php
in line 87

Definition in: typo3/sysext/core/Configuration/TCA/sys_file_reference.php

#1

Updated by Stefan Neufeind 3 months ago

Can we skip those special values?

In validateTcaType() possibly add check for ':' indicating this is no fieldName directly but points to a "sub-field".

foreach ($tableDefinition['columns'] as $fieldName => $fieldConfig) {
if ((strpos($fieldName, ':') === false) && isset($fieldConfig['config']) && is_array($fieldConfig['config']) && empty($fieldConfig['config']['type'])) {

Also available in: Atom PDF