Project

General

Profile

Actions

Bug #81116

closed

Custom image crop ration breaking BE with #1351584844: An argument "key" or "id" has to be provided

Added by Viktor Livakivskyi almost 7 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-05-02
Due date:
% Done:

0%

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

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80214: ImageManipulation: Example for dynamic variable name parts breaks BEClosed2017-03-09

Actions
Actions #1

Updated by Mona Muzaffar almost 7 years ago

  • Related to Bug #80214: ImageManipulation: Example for dynamic variable name parts breaks BE added
Actions #2

Updated by Daniel Goerz almost 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.

Actions #3

Updated by Viktor Livakivskyi over 6 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.

Actions #4

Updated by Alexander Opitz over 6 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Riccardo De Contardi about 6 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
Actions #6

Updated by Markus Klein over 5 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.

Actions

Also available in: Atom PDF