Bug #81862
closedCropVariants with static title break content elements, also Installed Services on reports module are broken
100%
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.
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53467
Updated by Daniel Goerz over 7 years ago
- Due date set to 2017-05-10
- Start date changed from 2017-07-13 to 2017-05-10
- Follows Bug #81168: Second parameter of LocalizationUtility::translate() should be optional added
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53467
Updated by Daniel Goerz over 7 years ago
- Subject changed from CropVariants with static title break content elements to CropVariants with static title break content elements, also Installed Services on reports module are broken
The "Installed Services" view in the Reports module is also affected (master only).
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53473
Updated by Anonymous over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cc3080d6affa4ee8a54bb6b076ea62106acf5339.