Bug #102041
closedfix error message: Invalid TCA internal_type set to folder
100%
Description
If an older version of an extension uses a TCA "group" of a type different to "db" and "folder", then an Exception is thrown with a wrong error message:
Invalid TCA internal_type of field "images" in table tt_content: Must not be set, or set to "folder".
The correct error message should have been like this:
Invalid TCA internal_type of field "images" in table tt_content: Must not be set, or set to "file".
See the file 'TYPO3/typo3_src-11.5.31/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php' line 151.
throw new \UnexpectedValueException(
'Invalid TCA internal_type of field "' . $fieldName . '" in table ' . $result['tableName']
. ': Must not be set, or set to "folder".',
1438780511
);
}
==>
. ': Must not be set, or set to "' . $internalType . '".',
see also deprecation notice:
Updated by Oliver Bartsch about 1 year ago
- Status changed from New to Needs Feedback
Hi, the exception should suggest a correct value to inform the developer how to avoid / resolve the exception.
or set to "file"would not be valid because only "db" and "folder" are valid in v11.
Updated by Franz Holzinger about 1 year ago
Hm, then this error message is really confusing at the moment, because it says: ".... must not be set to folder ." However this is wrong, because it should be set to "folder".
New proposal:
. ': Must not be set to "' . $internalType . '". Try to use "folder" instead.',
Updated by Oliver Bartsch about 1 year ago
Could you please check the current message again. AFAICS it currently already reads this way: Must not be set, or set to "folder"
, see https://github.com/TYPO3/typo3/blob/v11.5.31/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php#L152
Updated by Franz Holzinger about 1 year ago
But the current error message is so confusing. It uses a comma inside of the sentence. I always understood it that 'folder' has not been allowed.
It does not even show you what is currently set. So a user has no chance to easily search for the 'type' in his extension's PHP and XML code.
Updated by Gerrit Code Review about 1 year ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81324
Updated by Oliver Bartsch about 1 year ago
- Status changed from Under Review to Needs Feedback
Oke, this only targets 11.5 since in v12 we don't have this exception anymore and a TCA Migration is in place. I would be happy if you could check corresponding patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/81324.
Updated by Oliver Bartsch about 1 year ago
- Status changed from Needs Feedback to Under Review
Updated by Oliver Bartsch about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d5076dfac980968654cf248dcf5a112b90a13c3c.
Updated by Franz Holzinger about 1 year ago
Is there a TCA migration tool available for all extensions who come into this error?