[TYPO3-dev] Bug in ForViewHelper -> only first element shown
Michael Bakonyi
kontakt at mb-neuemedien.de
Tue Aug 27 17:32:14 CEST 2013
Hello there,
under certain circumstances there seems to be a bug within
\TYPO3\CMS\Fluid\ViewHelpers\ForViewHelper resulting in an output which
only shows the first element of e.g. 3 elements to be shown.
We could track down the problem to the foreach-construct on line 108:
although all necessary elements are present in the "$arguments['each']"
when entering the foreach its loop is left after the first time already.
Our guess is, that the pointer of the foreach is manipulated during the
renderChildren-process as the problem disappears when the foreach is
quick&dirty replaced by a custom for-construct [1].
I added the main code of the very simple extension to pastebin [2] and
you can also download the full extension [3]. After installing and
adding the plugin just create two records of type "Test" for the
checkboxes to be shown in the list-view. You'll see that only 1 checkbox
is shown in the frontend (recently tested with introduction-package
6.1.3 running with PHP 5.4.9 stable extended.
Before filing a bug-report I'd like to ask you to have a look at this to
be sure that we didn't miss something essential here.
If you need additional information just let me know.
Thx,
Michael
[1] http://transfer.civit.de/typo3/ForViewHelper.diff
[2] http://pastebin.com/EdhBYFsf
[3] http://transfer.civit.de/typo3/forviewhelper.zip
More information about the TYPO3-dev
mailing list