Project

General

Profile

Actions

Bug #16546

closed

editing template causes SQL error ' FROM ,pages'

Added by Franz Holzinger about 18 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-09-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Files

typo3-9.png (42 KB) typo3-9.png Administrator Admin, 2006-09-09 10:41
Actions #1

Updated by Franz Holzinger about 18 years ago

The original reason for this error is a wrong assignement in an extension which has assigned
an array to $TCA[NULL].
I think that this bug should not have such consequences.

Actions #2

Updated by Michael Stucki about 18 years ago

Fix the extension.

Actions #3

Updated by Michael Stucki about 18 years ago

Not a bug in TYPO3

Actions #4

Updated by Franz Holzinger almost 18 years ago

Hello Michael,

please let me fix this somehow.
I have lost again some hours due to this codeline in t3lib_transferData::selectAddForeign:

// 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);
}
}

This happens when an extension has an error inside of it. Then it really hard to debug for the reason of this.

Actions #5

Updated by Christian Kuhn almost 16 years ago

No feedback for a long time.

Please reopen if you still think this is an error in current TYPO3 core.

Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF