[TYPO3-irre] IRRE Problem overwriting title
Stefan Geith
typo3dev2008.nospam1 at geithware.de
Fri Oct 2 09:15:39 CEST 2009
More Information:
> I have a table named 'tx_family', that has an inline relation to table
> 'tx_childs':
>
> $TCA['tx_family'] = array (
> // ...
> 'columns' => array (
> 'mychilds' => array (
> 'label' => 'LLL:EXT:family/locallang_db.xml:tx_childs',
> 'config' => array (
> 'type' => 'inline',
> 'appearance' => Array('collapseAll'=>1, 'expandSingle'=>1,
> 'newRecordLinkAddTitle'=>1, 'newRecordLinkPosition'=>'both'),
> 'foreign_table' => 'tx_childs',
> 'foreign_field' => 'tx_childs.familyid',
> 'foreign_sortby' => 'tx_childs.title',
> )
> ),
Debug gives:
> INSERT INTO tx_childs
> (hidden, familyid, ...)
> VALUES ('0', '', ...)
>
> UPDATE tx_childs
> SET
> tx_childs.familyid='1',
> tx_childs.title='1'
> WHERE
> uid=3
>
> UPDATE tx_childs
> SET
> tx_childs.familyid='1',
> tx_childs.title='2'
> WHERE
> uid=1
When I change
'foreign_sortby' => 'tx_childs.title',
to
'foreign_sortby' => 'concat(tx_childs.title)',
(this should work, _IF_ used for sorting),
then I get an error-message (vi my debug-plugin):
<snip>
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near
'concat(tx_icondirect_icons.title)='1' WHERE uid=1'
Query =
UPDATE tx_icondirect_icons SET
tx_icondirect_icons.sourceid='1',
concat(tx_icondirect_icons.title)='1'
WHERE uid=1
</snip>
debug_backtrace:
<snip>
SC_alt_doc->processData#1461 // t3lib_TCEmain->process_datamap#314 //
t3lib_TCEmain->processRemapStack#941 // call_user_func_array#5286 //
t3lib_TCEmain->checkValue_inline_processDBdata# //
t3lib_loadDBGroup->writeForeignField#2471 //
ux_t3lib_DB->exec_UPDATEquery#670 // ux_t3lib_DB->myDebug#152
</snip>
With latest trunk.
/Stefan
More information about the TYPO3-project-irre
mailing list