Issue Bug Closed

#16546editing template causes SQL error ' FROM ,pages'

Franz Holzinger 09/09/06, 10:41 updated 10/02/18, 12:33

Description

When I click in the template module to edit a template then I get MYSQL error messages.

The reason for this is line 800 in file t3lib/class.t3lib_transferdata.php.

// neg_foreign_table
if (is_array($TCA[$fieldConfig[‘config’][‘neg_foreign_table’]])) {
$subres = t3lib_BEfunc::exec_foreign_table_where_query($fieldConfig,$field,$TSconfig,‘neg_’);
while ($subrow = $GLOBALS[‘TYPO3_DB’]->sql_fetch_assoc($subres)) {
$recordList[-$subrow[‘uid’]] = t3lib_BEfunc::getRecordTitle($fieldConfig[‘config’][‘neg_foreign_table’],$subrow);
}
}

Due to some error which I will investigate further, there happens to be a $TCA[‘NULL] array.

$TCA
Array (1)
Array (1) columns
Array (1) category
Array (11) config Array not debugged. Set higher “level” if you want to debug this.

So we need an additional
if ($fieldConfig[‘config’][‘neg_foreign_table’])

(issue imported from #M4188)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.