Issue Bug Closed

#110129Class \TYPO3\CMS\Core\Page\ContentArea should implement \Countable

Rony Khoury 07/01/26, 07:32 updated 08/11/26, 08:50

Description

Hi,

in my TYPO3 v14 instance I’m migrating all container content elements from \B13\Container\DataProcessing\ContainerProcessor to \B13\Container\DataProcessing\ContentAreaProcessor.

With ContainerProcessor it was possible to use the iteration feature in fluid <f:for each="{children_201}" as="contentElement" iteration="iteration">.

With the new ContentAreaProcessor this is no longer possible. if I want to use iteration I need to change <f:for each="{content.201}"...> to <f:for each="{content.201.records}"...> (see the added .record).

As discussed in Slack, it seems that \TYPO3\CMS\Core\Page\ContentArea does not implement \Countable and therefore {content.201} (which is of type ContentArea) can not be used with iteration of the f:for viewhelper:

> TypeError
>
> count(): Argument #1 ($value) must be of type Countable|array, TYPO3\CMS\Core\Page\ContentArea given

Reviews 2

History 48

  1. Mathias Brodala changed description 07/01/26, 07:35

  2. Matthias Vogel commented 07/01/26, 08:31

    Would be fixed with: https://github.com/TYPO3/Fluid/pull/1384
    With the patch in Fluid, all \Traversable are working, not only the once that are \Countable.

  3. Gerrit Code Review pushed patch set 1 for main to change 94659 status New Under Review 07/02/26, 10:00

  4. Gerrit Code Review pushed patch set 2 for main to change 94659 07/06/26, 07:16

  5. Gerrit Code Review pushed patch set 3 for main to change 94659 07/13/26, 16:25

  6. Gerrit Code Review pushed patch set 1 for 14.3 to change 94790 07/15/26, 12:54

  7. Matthias Vogel commented and changed status Under Review Resolved done 0 % 100 % 07/15/26, 13:00

    Applied in changeset commit:35dbf37e5fe855dbdeb19d5b0de3a4a8b2eb8417.

  8. Benni Mack changed status Resolved Closed 08/11/26, 08:50