contao-themes-net / odd-theme-bundle

odd theme bundle for contao cms
https://contao-themes.net/theme-detail/odd.html
Other
4 stars 2 forks source link

TeaserBoxElement.php : Uncaught PHP Exception TypeError: "unserialize(): Argument #1 ($data) must be of type string #31

Closed najbo closed 2 years ago

najbo commented 2 years ago

Bug description

[2022-03-29 07:42:00] request.CRITICAL: Uncaught PHP Exception TypeError: "unserialize(): Argument #1 ($data) must be of type string, null given" at /home/clients/89621db580ab1481ef3194dbb00075b2/sites/estoppey-addor.ch/vendor/contao-themes-net/theme-components-bundle/src/Element/TeaserBoxElement.php line 55 {"exception":"[object] (TypeError(code: 0): unserialize(): Argument #1 ($data) must be of type string, null given at /home/clients/89621db580ab1481ef3194dbb00075b2/sites/estoppey-addor.ch/vendor/contao-themes-net/theme-components-bundle/src/Element/TeaserBoxElement.php:55)"} []

Frontage is inaccessible, standard Contao error.

Steps to reproduce

Choose a teaser box element (wrapped with start and end element), select "Teaserboxen (350x200)" for image size, choose an image without a defined area (important zone).

Expected behavior

Should be no error if image has no important image ; should take the entire image in widget.

Screenshots

Important aera of image must be present on image, otherwise teaser throws an error on frontpage. pdr_odd_theme_bug_20220329

Environment

PHP 8.0.17, Contao 4.9.27, pdr Theme : odd-theme version 1.4

Thanks a lot !

seibtph commented 2 years ago

Can you please update the bundle and see if the bug is fixed? There is a new Theme Components Bundle version.

najbo commented 2 years ago

I confirm, it works. Thanks a lot.