Project

General

Profile

Actions

Bug #17224

closed

Mapping problem in content element selectboxes

Added by Sebastian Fischer about 17 years ago. Updated about 17 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-04-20
Due date:
% Done:

0%

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

Description

There is a problem with the mapping, when integrating external tables via the DBAL and showing a field with a selectbox.

In my case, i want to have an album with categories. These categories come from an second external table, that is mapped via DBAL too.

The first task is to display both albums and categories in an backend sysfolder. That works fine in both configuration, with variable mapping to a tablefield called 'page_id' and fixed mapping to a value. In both options the Listview shows the correct amount of albums and categories in the backend.

Second task is to be able to change the category of an album. Therefor i have configured the field in the tca.php to be a 'select' with foreign table pre_categories. Now it turns out, that there is something wrong in the mapping, because everytime i get a db failure and in the selectbox you can read [ Current value not allowed (3) ] even though the category is displayed in the Listview.

===== Example Configuration =====
$confArr['sysfolderID'] = 24;
$confArr['Prefix'] = 'non_';

===== Mapping in localconf =====
'pre_albums' => array (
'mapTableName' => $confArr['Prefix'] . 'albums',
'mapFieldNames' => array(
'pid' => 'page_id',
'uid' => 'aid',
)
),
'pre_categories' => array (
'mapTableName' => $confArr['Prefix'] . 'categories',
'mapFieldNames' => array(
'pid' => $confArr['sysfolderID'],
'uid' => 'cid',
)
),

===== TCA Configuration =====
'category' => Array (
'exclude' => 0,
'label' => 'Album Category',
'config' => Array (
'type' => 'select',
'items' => Array (
Array ('[ no Category ]', 0),
),
'size' => 1,
'maxitems' => 1,
'foreign_table' => 'pre_categories',
'foreign_table_where' => '',
)
),

===== Database Failure =====
0 SELECT pre_categories.cid, pre_categories.name
FROM pre_categories, pages
WHERE
pages.uid = pre_categories.pid AND pages.deleted = 0 AND 1 = 1
1 Unknown column 'pre_categories.pid' in 'where clause'
(issue imported from #M5465)


Files

class.ux_t3lib_db.php.patch (840 Bytes) class.ux_t3lib_db.php.patch Administrator Admin, 2007-04-28 14:32

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #17232: Fieldmapping doenst work on the "right side" in where clause.ClosedKarsten Dambekalns2007-04-23

Actions
Actions

Also available in: Atom PDF