[TYPO3-core] Weird behaviour after a recent change in all supported versions
Loek Hilgersom
loek at netcoop.nl
Mon Oct 8 22:27:13 CEST 2012
Hi Peter,
Thanks, that's exactly what it is.
I suppose we didn't run into this 'feature' before because we did not select the
uid fields. It'd be nice if the anti-recursion feature would only start working
at a higher recursion level, but I don't see how at the moment.
I'm not quite sure what the protection should do and what the limitations are
right now. At the moment, you can select the same record more than once on a
page, as long none of the earlier queries involved a sub-query.... I don't
really see the logic of that. I suppose it's meant to stop recursion, but it
stops a lot unproblematic queries.
I think a huge improvement would be to unset the value of
$GLOBALS['TSFE']->recordRegister[$originalRec] at the end of the function render
in class tslib_content_Content. It still blocks the same record to be selected
recursively, but it frees it up again for an entirely new, unrelated query on
the same page.
What do you think, would this break anything else? If not I'll make a patch.
Loek
On 08-10-12 09:35, Peter Niederlag wrote:
> Hi,
>
> On 07.10.2012 23:42, Loek Hilgersom wrote:
>> Hi core devs and others,
> [...]
>> If I query the same record twice on the same page, but the first query
>> contains a sub-query to get some additional information from another
>> table, then the second query fails.
>
> In the past it was *not* possible to select the same record twice
> without some TS-Stunts:
> http://forge.typo3.org/issues/28745
>
> From quick check of the code this still seems to be valid for CONTENT at
> least through to 4.6.x.
>
> Greets and hth,
> Peter
>
More information about the TYPO3-team-core
mailing list