Bug #86292
closedOverwriting crop variants title with TSConfig leads to exception
100%
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)
Updated by Christian Kuhn about 6 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.
Updated by Gerrit Code Review about 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/58322
Updated by Markus Klein about 6 years ago
- Related to Task #82454: Make TranslateViewHelper compilable added
Updated by Markus Klein about 6 years ago
- Related to Bug #79812: Allow overriding cropVariants for Image Manipulation added
Updated by Christian Kuhn about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 657f384aad6422c1756f44daa650517254057376.