0
votes

Is "languageField" only available for tt_content or pages table?

I want to use the CONTENT object on an own extension table:

renderObj = CONTENT
renderObj {

    table = tx_myext_domain_model_table

    select {    
        pidInList = 28
        languageField = sys_language_uid
    }

    renderObj = COA
    renderObj {
        10 = TEXT
        10.field = description_short
    }
}

But the translation not working. I tooked the TCA-, and SQL-settings from the tt_content. Also defined SQL-keys:

PRIMARY KEY (uid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY parent (pid,sorting),
KEY language (l18n_parent,sys_language_uid)

Can this be a bug like here described http://forge.typo3.org/issues/22406?

edited

In the file typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 7578 (TYPO3 6.1.7) you will find these lines:

        if ($GLOBALS['TSFE']->sys_language_contentOL && $GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
            // Sys language content is set to zero/-1 - and it is expected that whatever routine processes the output will
            // OVERLAY the records with localized versions!
            $sys_language_content = '0,-1';
        } else {
            $sys_language_content = intval($GLOBALS['TSFE']->sys_language_content);
        }
        $query .= ' AND ' . $conf['languageField'] . ' IN (' . $sys_language_content . ')';

And $GLOBALS['TSFE']->sys_language_contentOL will be 1. So there will be no translation.

This is the config:

config {
  sys_language_uid = 1
  sys_language_mode = content_fallback; 0
  sys_language_overlay = 1
}

With this config I expect a translation…

1
Looks quite like the issue described. Enable sqlDebug in the install tool, find the query and check it with phpMyAdmin (or by reading). Consider using the workaround in the Forge issue. (The KEY fields in MySQL don't matter here, btw.) - lorenz
Updated my question with more output. - user2513437

1 Answers

1
votes

I feel like a newbie. Page translation layer/record was missing !!!