Bug #81116
closedCustom image crop ration breaking BE with #1351584844: An argument "key" or "id" has to be provided
0%
Description
Issue is same as closed #80214
My TCA/Overrides/sys_file_reference.php
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['cropVariants']['default']['allowedAspectRatios']['21:9'] = [ 'title' => '21:9', 'value' => 21 / 9 ];
Editing tt_content record with images in BE brings:
#1351584844: An argument "key" or "id" has to be provided
TYPO3 8.7.1
Updated by Mona Muzaffar almost 8 years ago
- Related to Bug #80214: ImageManipulation: Example for dynamic variable name parts breaks BE added
Updated by Daniel Goerz over 7 years ago
- Status changed from New to Needs Feedback
I cannot reproduce this error. It seems to be fixed. Please provide further Feedback on how to reproduce on the current release of 8LTS if the bug still occurs for you. Otherwise we can close this issue.
Updated by Viktor Livakivskyi over 7 years ago
Still reproducible in TYPO3 8.7.3
You need to create a TCA override file for sys_file_reference with the contents above to see the error.
But the following code works:
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['cropVariants']['default'] = [
'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.crop_variant.default',
'allowedAspectRatios' => [
'21:9' => [
'title' => '21:9',
'value' => 21 / 9
],
],
];
And if I remove the title
key-value from the array above, the error is back again.
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['cropVariants']['default']['allowedAspectRatios'] = [
'21:9' => [
'title' => '21:9',
'value' => 21 / 9
],
];
It seems like the overrides for crop variants are not acting as overrides, but as a replacement, therefore previously initialized title
is removed and an error occurs.
Updated by Alexander Opitz over 7 years ago
- Status changed from Needs Feedback to New
Updated by Riccardo De Contardi about 7 years ago
The problem seems still present in TYPO3 8.7.9.
The full error message:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1351584844: An argument "key" or "id" has to be provided | TYPO3Fluid\Fluid\Core\Exception thrown in file /TYPO3-dists/typo3_src-8.7.9/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php in line 133. Requested URL: http://typo3.8.development.it:8899/typo3/index.php?ajaxID=%2Fajax%2Frecord%2Finline%2Fcreate&ajaxToken=14dbd123edc51e114f4e6016d09e5451a728512b
Plus, the error sets also an error 500 (at least for me); the apache log reads:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://typo3.7.master.it:8899/typo3/index.php?route=%2Fmain&token=86b8f8805a867dae6cf9b3730755e76cb3a236df
Updated by Markus Klein about 6 years ago
- Status changed from New to Rejected
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['cropVariants']['default']['allowedAspectRatios'] = [..]
This line is a replacement. You override the configuration completely with your new definition.
(That's how array operations in PHP work.)
If you want to override only some keys, either set them explicitly or use an array_*
function from PHP to merge the existing and your new configuration.