FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
190 stars 229 forks source link

Regression with content.render in Version 6.1.3 #1844

Closed psternuva closed 11 months ago

psternuva commented 1 year ago

In vhs Version 6.1.3

<v:content.render column="0" render="1" slide="-1" />

produces no content. There are no error messages, including in the Typo3 log. The page is rendered (with header etc.) but with no content from the viewhelper.

This was working perfectly as expected up to inc. version 6.1.2

Typo3 Version 11.5.23 PHP Version 8.0

psternuva commented 1 year ago

I suspect it was the changes in this commit https://github.com/FluidTYPO3/vhs/commit/99e05be074c03e10a6ef2f9c244f805d8d9d8b8f perhaps to SlideViewHelperTrait ?

dertimon commented 1 year ago

Same for me

denislorch commented 1 year ago

I ran into the same issue yesterday, it's a duplicate of https://github.com/FluidTYPO3/vhs/issues/1819, use the limit parameter to fix it

psternuva commented 1 year ago

@denislorch Thanks for the info.

There should not be such a breaking change in a patch level release.

kev-andrews commented 1 year ago

We are also experiencing the issue of disappearing content after updating from 6.1.2 to 6.1.3, our code for the Viewhelper is structured as follows: <v:content.render column="10" pageUid="{data.uid}" slide="-1" slideCollect="-1" slideCollectReverse="1" as="contentElements" render="false"> Downgrading to 6.1.2 immediately fixes the issue.

denislorch commented 1 year ago

My suggestion is to skip this patch lvl version "fluidtypo3/vhs": "^6.0, !=6.1.3", because we ran in further similar issues with other view handlers (ressources.fal), another pro is to prevent temporary solution reverts later on.

shroom24 commented 1 year ago

The problem lies in FluidTYPO3\Vhs\Traits\SlideViewHelperTrait line 150

$limitRemaining = $limit - count($records);

Since $limit is null by default and null minus an integer is always 0 the lines 151 - 153 if (0 >= $limitRemaining) { break; } will break the function.

Temporary solution is to set a limit on the tag <v:content.render column="3" slide="-1" limit="999" />

But should be fixed anyhow.

NamelessCoder commented 11 months ago

Fixed in dev-development.