Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-513

Getting error message when previewing the content of Content List Block

    Details

      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\"}}
      

        Activity

        Show
        Łukasz Serwatka added a comment - PR: https://github.com/ezsystems/EzLandingPageFieldTypeBundle/pull/111
        Show
        Łukasz Serwatka added a comment - Merged into master: https://github.com/ezsystems/EzLandingPageFieldTypeBundle/commit/a2a541a07180ff36414e8af696338d9244b89186

          People

          • Assignee:
            Unassigned
            Reporter:
            Piotr Nalepa
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: