[TYPO3-core] Popular stdWrap issue

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Jul 17 21:22:00 CEST 2012


Am 17.07.2012 18:13, schrieb Helmut Hummel:
> Hi Markus,
>
> On 17.07.12 12:01, Markus Klein wrote:
>> Hi Core Devs,
>>
>> could someone please take a closer look at [1].
>> People are already post +1s to forge, so it seems that is quite an
>> important issue.
>> The patch [2] already has enough votes from anybody.
>
> I mentioned already in the patch set 3 that unit tests should be added
> for this change.
>
> It is not hard to do so. The most complicated thing is to know what the
> expected baviour is, which is required for a successful review anyway.
>
> I fear that the magic introdced[1] is unfixable without a real SQL query
> parser. The easiest way to "fix" it would be to revert the whole thing
> and document that you need to add the versioning fields in TypoScript if
> you need the workspace preview.
>
> just my 2 cents

For the record, I also think this is a bit of a "hack" to parse SQL at 
this point. But alas, it works (despite the bugs) and now covered with 
some unit tests gives us at least a better groundwork for further "fine 
tunings" if they are required.

Please note that the "rowNums" problem due to wrong SQL only pops up 
with MySQL 5.0 (e.g. debian lenny), so you *won't* be able to reproduce 
the bug in MySQL 5.1 (debian squeeze).

Test with this snippet:

page.1 = TEXT
page.1.value = TEST
page.1.if.isTrue.numRows {
   table = pages
   select {
     pidInList.field = uid
     where = doktype IN (1,199)
   }
}

You should see "TEST" on top of your page if the current page has 
subpages. If you never see TEST, it means the SQL failed. :)

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list