[TYPO3-english] sys_language_uid, fallback on default language

Muriel le Pair typo3 at strangefruit.nl
Wed Mar 14 14:32:11 CET 2012


Op 14-03-12 14:00, Muriel le Pair schreef:
> Op 14-03-12 12:40, Markus Klein schreef:
>
>> One way to do it is:
>>
>> // language overlay
>> if ($GLOBALS['TSFE']->sys_language_contentOL) {
>> $OLmode = $GLOBALS['TSFE']->sys_language_contentOL;
>> $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $row,
>> $GLOBALS['TSFE']->sys_language_content, $OLmode);
>> }
>
> Very strange, it just doesn't work.
> So the first query fetches the records with: sys_language_uid = 0.
>
> If I output getRecordOverlay() with debug() ($row =
> $GLOBALS['TSFE']->sys_page->getRecordOverlay(..) the output is exactly
> the same as the default language.
>
> So the records are not translated.

Ok, it still doesn't work, as I suspected it has something to do with 
the fact that I'm using a JOIN in the query.

How do you overlay a query with a join??

$item_q = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
$select_fields = 'tx_sfmdfcourse_course.uid, 
tx_sfmdfcourse_course.title, d.uid as did, d.place, d.date_from, 
d.date_until',
$from_table = 'tx_sfmdfcourse_course left join tx_sfmdfcourse_date as d 
on (tx_sfmdfcourse_course.uid = d.course_id)',
$where_clause = 'tx_sfmdfcourse_course.pid = '.$record_id.$where.' AND 
tx_sfmdfcourse_course.sys_language_uid = 0 
'.tslib_cObj::enableFields('tx_sfmdfcourse_course'),
$groupBy = '',
$order_by,
$limit = '500'
);

--
kind regards,

Muriel le Pair



More information about the TYPO3-english mailing list