[TYPO3-core] RFC #13942: Hiding Option Checkboxes and search fields on "empty" list view does not work

Jigal van Hemert jigal at xs4all.nl
Mon Aug 9 11:18:53 CEST 2010


On 9-8-2010 10:58, Sebastian Michaelsen wrote:
> Am 09.08.10 10:30, schrieb Jigal van Hemert:
>> debug_backtrace SC_db_list->main#448 //
>> recordList->showSysNotesForPage#400 // t3lib_DB->exec_SELECTquery#366 //
>> t3lib_DB->debug#259
> At the moment I can not think of why reading the variable
> $dblist->counter can cause an SQL-Error. But I'll test it this evening.

In SC_db_list::main() on line 229 the counter is set:
$dblist->counter++;

I assume that this causes $dblist->counter to be evaluated as TRUE if no 
page was selected.
Inside the block with if($dblist->counter) on line 397/400 (before/after 
patch) a call is made to display the sys_notes:
$this->body .= $dblist->showSysNotesForPage();

There is current page so the query in this function results in a syntax 
error because of "pid IN ()" in the where clause.

Checking $dblist->counter isn't a reliable check to see if there is no 
list shown.
Either the initialisation in main() is incorrect or you should check for 
a 'current' page too.
The initialisation of the counter is such a "strange" construction that 
I assume that it wasn't done this way without a reason.

-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list