Actions
Bug #81862
closedCropVariants with static title break content elements, also Installed Services on reports module are broken
Status:
Closed
Priority:
Must have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2017-05-10
Due date:
2017-05-10
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
Reproduce:
Add a custom cropVariant with a static title (no locallang string with LLL:). E.g.:
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config'] = [ 'type' => 'imageManipulation', 'cropVariants' => [ 'mobile' => [ 'title' => 'Mobile', 'focusArea' => [ 'x' => 1 / 3, 'y' => 1 / 3, 'width' => 1 / 3, 'height' => 1 / 3, ], 'allowedAspectRatios' => [ '4:3' => [ 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.4_3', 'value' => 4 / 3 ], 'NaN' => [ 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.free', 'value' => 0.0 ], ], ]
The title is passed to the f:translate
ViewHelper wich passes it to LocalizationUtility
which was changed in #81168 to throw an exception if the passed key does not start with LLL
and no $extensionName
is given. The newly introduced exception is not catched in the ViewHelper, so a possible $default
value is not rendered.
Therefore it is not possible to add any image to a content element with the cropVariant above, neither is it possible to edit an existing image because the AJAX calls will always run in the exception.
Actions