Project

General

Profile

Actions

Bug #86292

closed

Overwriting crop variants title with TSConfig leads to exception

Added by Susanne Moog over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2018-09-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Using config as described in https://review.typo3.org/#/c/51676/ does not work anymore, an exception is thrown.

How to reproduce:

Add the following in page TSConfig:

    TCEFORM.sys_file_reference.crop.config.cropVariants {
        default {
            title = Default desktop
            selectedRatio = NaN
            allowedAspectRatios {
                NaN {
                    title = free
                    value = 0.0
                }
            }
        }
        specialMobile {
            title = Our special mobile variant
            selectedRatio = NaN
            allowedAspectRatios {
                4:3 {
                    title = ratio 4/3
                    value = 1.3333333
                }
            }
        }
    }

Open any element with crop wizard (textpic for example) --> an exception is thrown.

Caused by https://review.typo3.org/#/c/54119/ (the compiled version of the translate viewhelper does not catch exceptions)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #82454: Make TranslateViewHelper compilableClosed2017-09-11

Actions
Related to TYPO3 Core - Bug #79812: Allow overriding cropVariants for Image ManipulationClosed2017-02-14

Actions
Actions #1

Updated by Christian Kuhn over 5 years ago

confirmed. easy to reproduce. make sure to reload twice to crash the second time when the compiled file is there.

had a chat with claus about that:

hey claus. aftermath to https://review.typo3.org/#/c/54119/ : quite quickly afterwards, https://review.typo3.org/#/c/55983/ has been merged. susi now found https://forge.typo3.org/issues/86292 ... i just tried now to have the compiled version create code that has a try/catch around. in effect it then basically looks nearly identical to the renderStatic() before https://review.typo3.org/#/c/54119/ ... this then does not make much sense to me anymore since the only "overhead" left is then the static call to renderStatic in the compiled template in comparison to inline compiled code. in php a (static) method call does not matter, its basically irrelevant how often it is called .... i thus tend to revert the initial patch entirely.
what do you think?

Claus Due [9:52 PM]
re: patches I would tend to completely agree with your standpoint. When there's no optimisation except avoiding a wrapper method and loading a class.... it's not really an optimisation after all.

Christian Kuhn [9:53 PM]
kk. i'll prepare a revert of the entire thing.
thx.

Actions #2

Updated by Gerrit Code Review over 5 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/58322

Actions #3

Updated by Markus Klein over 5 years ago

  • Related to Task #82454: Make TranslateViewHelper compilable added
Actions #4

Updated by Markus Klein over 5 years ago

  • Related to Bug #79812: Allow overriding cropVariants for Image Manipulation added
Actions #5

Updated by Christian Kuhn over 5 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF