[TYPO3-dev] itemsProcFunc in checkboxes bug?

Sven Dörndorfer sven at doerndorfer.de
Tue Jul 18 09:32:11 CEST 2006


Hi all,

when using the itemsProcFunc inside the 'check' TCA configuration like this

"modules" => Array (		
	"exclude" => 1,		
	"label" => "Some label",		
	"config" => Array (
		"type" => "check",
		"itemsProcFunc" => "tx_myExt_itemsProcFunc->main"
	)
)

then each checkbox is shown in TCEForms, but the values will not be 
processed in correct way.
I have found that the problem is in t3lib_tcemain::checkValue_check(), 
around line 1224

if ($value>$maxV)	{$value=$maxV;}

where $maxV is not correct, because there is no count for $itemC 4 lines above.

I use the following function to fill in values for checkboxes:

class tx_myExt_itemsProcFunc {
	function main(&$config, &$item) {
		$res = $GLOBALS['TYPO3_DB'] -> exec_SELECTquery('uid,title', 
'tx_myExt_modules', 'deleted=0 AND hidden=0');
		while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
			$config['items'][] = Array($row['title'], $row['uid']);
		}
	}
}


Can someone confirm, that this is a bug, oir do I have to use som other 
configuration?

Regards, Sven.





More information about the TYPO3-dev mailing list