Details
-
Bug
-
Resolution: Fixed
-
High
-
2015.12
Description
Getting error message:
[2016-01-25 12:13:13] request.CRITICAL: Uncaught PHP Exception EzSystems\LandingPageFieldTypeBundle\Exception\InvalidBlockAttributeException: "Invalid attribute limit in Content List Block. Error message: Limit must be a number greater than 0." at /vendor/ezsystems/landing-page-fieldtype-bundle/src/FieldType/LandingPage/Model/Block/ContentListBlock.php line 160 {"exception":"[object] (EzSystems\\LandingPageFieldTypeBundle\\Exception\\InvalidBlockAttributeException(code: 0): Invalid attribute limit in Content List Block. Error message: Limit must be a number greater than 0. at /vendor/ezsystems/landing-page-fieldtype-bundle/src/FieldType/LandingPage/Model/Block/ContentListBlock.php:160)"}
After investigation I found that there's incorrect data provided from backend, where the limit doesn't have type of integer, but has the string type instead.
{\"id\":\"b-3d66d5af-57f9-1e3c-f3e2-9f26af4fb7a4\",\"type\":\"contentlist\",\"name\":\"Content List Block\",\"view\":\"contentlist\",\"ttl\":\"0\",\"attributes\":{\"contentId\":\"64\",\"contentType\":\"blog_post\",\"limit\":\"5\"}}