[TYPO3-project-formidable] Problem with using <compiledatasource> inside LISTER

Paweł Bandura gawelx at gmail.com
Tue Jun 12 22:20:59 CEST 2007


Paweł Bandura pisze:
> Hi Jerome
> Thanks very much for help :]
> Adding this variable initialization removed 3 of 4 warnings, but 
> unfortunately this one warning message still shows up:
> Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL 
> result resource in 
> D:\TYPO3_4.1.1\htdocs\Konsultacje\t3lib\class.t3lib_db.php on line 987
> 
> Once again I got my query as simple as it could be to make sure it isn't 
> the problem, but even if there was two text fields from one table int 
> the query - the message still was there.
> 
> I don't know if it's a FORMidable problem - you wrote that this removes 
> all the errors, so I assume you don't get this warning.
> I'm using FORMidable Revision 55 (HEAD).

OK, I found the couse of the warning message - init() function in my 
class.ext_piX.php file calls (through _initDataHandler()->_initCols()) 
admin_get_fields() function, which tries to execute the "SHOW columns 
FROM my_view_table_name" query. The result of executing this query is 
FALSE because this view (temporary) table is created in render() 
function called after the init() function in class.ext_piX.php file - so 
th table doesn't exist while the query is being executed.

For now I've commented lines 429-431 in class.tx_dhlister.php. It is the 
part of _initCols() function:
/*		$this->__aCols = $GLOBALS["TYPO3_DB"]->admin_get_fields(
			$this->_navConf("/tablename")
		);*/

The warning message is gone and everything seems to work fine. But lets 
be honest - I don't know what I've done :]
I simply don't know what exactly this instruction does and what it is 
for. I assume it has it's purpose so my solution eliminates this 
problem, but may (and probably will) cause another :]

That's why it'd be wanderful if someone smarter than me verified this.

Best regards
Paweł


More information about the TYPO3-project-formidable mailing list