#110129Class \TYPO3\CMS\Core\Page\ContentArea should implement \Countable
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
-
Mathias Brodala changed description 07/01/26, 07:35
-
Matthias Vogel commented 07/01/26, 08:31
-
Gerrit Code Review pushed patch set 1 for main to change 94659 status
NewUnder Review 07/02/26, 10:00 -
Gerrit Code Review pushed patch set 2 for main to change 94659 07/06/26, 07:16
-
Gerrit Code Review pushed patch set 3 for main to change 94659 07/13/26, 16:25
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 94790 07/15/26, 12:54
-
Matthias Vogel commented and changed status
Under ReviewResolved done0 %100 % 07/15/26, 13:00Applied in changeset commit:35dbf37e5fe855dbdeb19d5b0de3a4a8b2eb8417.
-
Benni Mack changed status
ResolvedClosed 08/11/26, 08:50
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.