[TYPO3-dev] Setting records to sys_language_uid=-1 on import

Henjo Hoeksma me at henjohoeksma.nl
Sun Nov 13 01:47:42 CET 2011


Hi list,

for a XML import I would like to automatically set the record to be for all
languages, i.e. sys_language_uid=-1.

In order to do this, I do the following after the record has been persisted
to the database where $language is set to -1:

$data = array();
$data[$table][$pUid]['sys_language_uid'] = $language;
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->start($data, array());
$tce->process_datamap();

However, when checking afterwards the record is set to -1 in the database,
but still is in the default language in the list view.
I also tried to 'localize' it to 'All' using:

$cmd = array();
$cmd[$table][$pUid]['localize'] = $language;
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->start(array(), $cmd);
$tce->process_cmdmap();
unset($tce);
unset($cmd);

This doesn't seem to do anything at all.
When using any other language than -1, localizing it works well.

Any clues on what goes wrong here?

Thanks in advance for your response.

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.



More information about the TYPO3-dev mailing list