tt_news: no news_id given when changing language in single view


lib.tslangmenu = COA
lib.tslangmenu {
    10 = HTML
    10.value(
        <img src=”fileadmin/templates/images/languages_en.png” width=”48″ height=”121″ alt=”Languages” />
        <div id=”LanguageContents”>
    )

    20 = HMENU
    20.special = language
    20.wrap = <div id=”AvailableLanguages”>|</div>
    20.special.value = 0,1
    20.1 = GMENU
    20.1.NO {
        XY = 24,16
        5 = IMAGE
        5.file = fileadmin/templates/images/deutsch.png || fileadmin/templates/images/englisch.png
        additionalParams.cObject = COA
        additionalParams.cObject {
            5 = TEXT
            5.wrap = &L=1

            10 = TEXT
            10.data = GPvar : tx_ttnews | backPid
            10.wrap = &tx_ttnews[backPid]=|
            10.required = 1

            20 = TEXT
            20.data = GPvar : tx_ttnews | tt_news
            20.wrap = &tx_tt_news[tt_news]=|
            20.required = 1

            30 = TEXT
            30.data = GPvar : cHash
            30.wrap = &cHash=|
            30.required = 1
        }
    }

    30 = HTML
    30.value(
        <img src=”fileadmin/templates/images/languages_en.png” width=”48″ height=”121″ alt=”Languages” />
        </div>
    )

According to the information I found I should use additionalParams and set the parameter with GPVar. But I always get the no news_id given message.

Here is my RealURL Config:

$GLOBALS[‘TYPO3_CONF_VARS’][‘EXTCONF’][‘realurl’] = array (
    ‘_DEFAULT’ => array (
        ‘init’ => array (
            ‘enableCHashCache’ => ‘1’,
            ‘appendMissingSlash’ => ‘ifNotFile’,
            ‘enableUrlDecodeCache’ => ‘1’,
            ‘enableUrlEncodeCache’ => ‘1’,
        ),
    ‘redirects’ => array (
        ),
        ‘preVars’ => array (
            ‘0’ => array (
                ‘GETvar’ => ‘no_cache’,
                ‘valueMap’ => array (
                    ‘nc’ => ‘1’,
                ),
                ‘noMatch’ => ‘bypass’
            ),
            ‘1’ => array (
                ‘GETvar’ => ‘L’,
                ‘valueMap’ => array (
                    ‘de’ => ‘0’,
                    ‘en’ => ‘1’,
                ),
                ‘valueDefault’ => ‘de’,
                ‘noMatch’ => ‘bypass’,
            ),
            ‘2’ => array (
                ‘GETvar’ => ‘lang’,
                ‘valueMap’ => array (
                    ‘de’ => ‘de’,
                    ‘en’ => ‘en’,
                ),
            ‘noMatch’ => ‘bypass’,
            ),
        ),

        ‘pagePath’ => array (
            ‘type’ => ‘user’,
            ‘userFunc’ => ‘EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main’,
            ‘spaceCharacter’ => ‘-‘,
            ‘languageGetVar’ => ‘L’,
            ‘expireDays’ => ‘7’,
            ‘rootpage_id’ => ‘1’,
        ),
        ‘fixedPostVars’ => array (
        ),
        ‘postVarSets’ => array (
            ‘_DEFAULT’ => array (
                ‘archive’ => array (
                    ‘0’ => array (
                        ‘GETvar’ => ‘tx_ttnews[year]’,
                        ),
                    ‘1’ => array (
                        ‘GETvar’ => ‘tx_ttnews[month]’,
                        ‘valueMap’ => array (
                        ‘january’ => ’01’,
                        ‘february’ => ’02’,
                        ‘march’ => ’03’,
                        ‘april’ => ’04’,
                        ‘may’ => ’05’,
                        ‘june’ => ’06’,
                        ‘july’ => ’07’,
                        ‘august’ => ’08’,
                        ‘september’ => ’09’,
                        ‘october’ => ’10’,
                        ‘november’ => ’11’,
                        ‘december’ => ’12’,
                    ),
                ),
            ),
            ‘browse’ => array (
                ‘0’ => array (
                    ‘GETvar’ => ‘tx_ttnews[pointer]’,
                ),
            ),
            ‘select_category’ => array (
                ‘0’ => array (
                    ‘GETvar’ => ‘tx_ttnews[cat]’,
                ),
            ),
            ‘article’ => array(
                array(
                    ‘GETvar’ => ‘tx_ttnews[pointer]’,
                    ‘valueMap’ => array(),
                    ‘noMatch’ => ‘bypass’,
                ),
                array(
                    ‘GETvar’ => ‘tx_ttnews[tt_news]’,
                    ‘lookUpTable’ => array(
                    ‘table’ => ‘tt_news’,
                    ‘id_field’ => ‘uid’,
                    ‘alias_field’ => ‘title’,
                    ‘addWhereClause’ => ‘ AND NOT deleted’,
                    ‘useUniqueCache’ => 1,
                    ‘useUniqueCache_conf’ => array(
                        ‘strtolower’ => 1,
                        ‘spaceCharacter’ => ‘-‘,
                    ),
                    ‘languageGetVar’ => ‘L’,
                    ‘languageExceptionUids’ => ”,
                    ‘languageField’ => ‘sys_language_uid’,
                    ‘transOrigPointerField’ => ‘l18n_parent’,
                    ‘autoUpdate’ => 1,
                    ‘expireDays’ => 180,
                ),
            ),
            array (
                ‘GETvar’ => ‘tx_ttnews[swords]’,
            ),
        ),
    ),
),

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s