[TYPO3-dev] Why it clean my relations
Dawid Pacholczyk
dpacholczyk at gmail.com
Thu Jun 16 15:35:59 CEST 2011
Hi, I`ve created small ext that is changing tt_news tca. It creates a
dictionary of keywords instead of input and comma separated words. It is
a mm relation
Now when I add new keyword via tt_news (that is not in DB and I click
the add button near list) I`am transfered to keywords tca. Everything
works. When I add and save new word. It saves with relation to the
articles. Great ! But when I close the keyword form and I`am transfered
back to tt_news the relations (old ones) are cleaned and the article is
connected only with new keyword. Whats wrong ? Below my tca config
$tempColumns = Array (
"keywords" => Array (
"exclude" => 1,
"label" =>
"LLL:EXT:beck_keywords/locallang_db.xml:tx_beckkeywords_keywords.related_news",
"config" => Array (
"type" => "select",
"foreign_field" => "keyword",
"foreign_table" => "tx_beckkeywords_keywords",
"foreign_table_where" => "ORDER BY tx_beckkeywords_keywords.uid",
"size" => 20,
"minitems" => 0,
"maxitems" => 10,
"internal_type" => "db",
"allowed" => "tx_beckkeywords_keywords",
"MM" => "tx_beckkeywords_keywords_related_news_mm",
"wizards" => Array(
"_PADDING" => 2,
"_VERTICAL" => 1,
"suggest" => array(
"type" => "suggest",
"params" => Array(
"table"=>"tx_beckkeywords_keywords",
"pid" => "###CURRENT_PID###",
),
),
'add' => Array(
'type' => 'script',
'title' => 'Dodaj',
'icon' => 'add.gif',
'params' => Array(
'table'=>'tx_beckkeywords_keywords',
'pid' => '###CURRENT_PID###',
'setValue' => 'set'
),
'script' => 'wizard_add.php',
),
),
)
),
);
t3lib_div::loadTCA("tt_news");
t3lib_extMgm::addTCAcolumns("tt_news",$tempColumns,1);
More information about the TYPO3-dev
mailing list