Project

General

Profile

Actions

Bug #81862

closed

CropVariants with static title break content elements, also Installed Services on reports module are broken

Added by Daniel Goerz over 6 years ago. Updated over 5 years ago.

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.


Related issues 1 (0 open1 closed)

Follows TYPO3 Core - Bug #81168: Second parameter of LocalizationUtility::translate() should be optionalClosedXavier Perseguers2017-05-09

Actions
Actions #1

Updated by Gerrit Code Review over 6 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

Actions #2

Updated by Daniel Goerz over 6 years ago

  • Description updated (diff)
Actions #3

Updated by Daniel Goerz over 6 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
Actions #4

Updated by Gerrit Code Review over 6 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

Actions #5

Updated by Daniel Goerz over 6 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).

Actions #6

Updated by Gerrit Code Review over 6 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

Actions #7

Updated by Anonymous over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF