Bug #90103
closed<ce:link.clickEnlarge in the Partial /media/types/image.html => fatal-error when called with argument "dimensions: {width: data.imagewidth, height: data.imageheight}"!?
0%
Description
In the database the tt_content elements "imagewidth" and "imageheight" have type "int(10)".
When you debug the data in the partial "media/type/image.html" [<f:debug>{dimensions}</f:debug> you'll see that the type of {data.width} and {data.height} is "double" and NOT "integer" like the DB-Fields!?
Building the dimension-argument for the partial="Media/Type/Image" like
<f:render partial="Media/Type/Image" arguments="{file: img, dimensions: {width: data.imagewidth, height: data.imageheight}, data: data, settings: settings}" />
the dimensions.width and .height will be integer and not double because data.imagewidth and data.imageheight are integer.
When you now set the checkbox for the image-zooming you'll get this error-message:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to TYPO3\CMS\Core\TypoScript\TypoScriptService::convertPlainArrayToTypoScriptArray() must be of the type array, null given, called in /html/typo3/typo3_src-9.5.13/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php on line 78 | TypeError thrown in file /html/typo3/typo3_src-9.5.13/typo3/sysext/core/Classes/TypoScript/TypoScriptService.php in line 65. Requested URL: http://p474869.mittwaldserver.info/akk/?no_cache=1
So I tried this:
I modified the tt_content elements "imagewidth" and "imageheight" in the database to type "*double(12,0)*".
Result: NO ERROR any more!!!
So what's to do?
Either corrections in the ClickEnlargeViewHelper or change the db-datatypes of "imagewidth" and "imageheight" to double(12,0)
Files