Project

General

Profile

Bug #81862

Updated by Daniel Goerz almost 7 years ago

Reproduce: 

 Add a custom cropVariant with a static title (no locallang string with LLL:). E.g.: 

 <pre> 
 @ 
 $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 
                     ], 
                 ], 
             ] 
 </pre> ],@ 

 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.

Back