title: tt_news: no news_id given when changing language in single view
body: <p>I'm using TYP 4.5.5, RealURL 1.11.2 and tt_news 3.0.1. I want that the user can switch the language and the corresponding news is shown in the users language. All should work with RealURL.</p>
  
  <p>When switching language the news id is not submitted. So I have to explicitely submit the id. I found some threads which showed me how it could work, but I didn't get it managed. Here is my TS:</p>
  
  <pre><code>lib.tslangmenu = COA
  lib.tslangmenu {
    10 = HTML
    10.value(
      &lt;img src="fileadmin/templates/images/languages_en.png" width="48" height="121" alt="Languages" /&gt;
      &lt;div id="LanguageContents"&gt;
    )
  
    20 = HMENU
    20.special = language
    20.wrap = &lt;div id="AvailableLanguages"&gt;|&lt;/div&gt;
    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 = &amp;L=1 
  
        10 = TEXT
        10.data = GPvar : tx_ttnews | backPid
        10.wrap = &amp;tx_ttnews[backPid]=|
        10.required = 1
  
        20 = TEXT
        20.data = GPvar : tx_ttnews | tt_news
        20.wrap = &amp;tx_tt_news[tt_news]=|
        20.required = 1
  
        30 = TEXT
        30.data = GPvar : cHash
        30.wrap = &amp;cHash=|
        30.required = 1
      } 
    }
  
    30 = HTML
    30.value(
      &lt;img class="languagebutton" src="fileadmin/templates/images/languages_en.png" width="48" height="121" alt="Languages" /&gt;
      &lt;/div&gt;
    )
  </code></pre>
  
  <p>According to the information I found I should use <code>additionalParams</code> and set the parameter with <code>GPVar</code>. But I always get the <code>no news_id given</code> message.</p>
  
  <p>Here is my RealURL Config:</p>
  
  <pre><code>$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array ( 
      '_DEFAULT' =&gt; array (
          'init' =&gt; array (
              'enableCHashCache' =&gt; '1',
              'appendMissingSlash' =&gt; 'ifNotFile',
              'enableUrlDecodeCache' =&gt; '1',
              'enableUrlEncodeCache' =&gt; '1',
          ),
          'redirects' =&gt; array (
          ),
          'preVars' =&gt; array (
              '0' =&gt; array (
                  'GETvar' =&gt; 'no_cache',
                  'valueMap' =&gt; array (
                      'nc' =&gt; '1',
                  ),
                  'noMatch' =&gt; 'bypass'
              ),
              '1' =&gt; array (
                  'GETvar' =&gt; 'L',
                  'valueMap' =&gt; array (
                      'de' =&gt; '0',
                      'en' =&gt; '1',
                  ),
                  'valueDefault' =&gt; 'de',
                  'noMatch' =&gt; 'bypass',
              ),
              '2' =&gt; array (
                  'GETvar' =&gt; 'lang',
                  'valueMap' =&gt; array (
                      'de' =&gt; 'de',
                      'en' =&gt; 'en',
                  ),
                  'noMatch' =&gt; 'bypass',
              ),
          ),
          'pagePath' =&gt; array (
              'type' =&gt; 'user',
              'userFunc' =&gt; 'EXT:realurl/class.tx_realurl_advanced.php:&amp;tx_realurl_advanced-&gt;main',
              'spaceCharacter' =&gt; '-',
              'languageGetVar' =&gt; 'L',
              'expireDays' =&gt; '7',
              'rootpage_id' =&gt; '1',
          ),
          'fixedPostVars' =&gt; array (
          ),
          'postVarSets' =&gt; array (
              '_DEFAULT' =&gt; array (
                  'archive' =&gt; array (
                      '0' =&gt; array (
                          'GETvar' =&gt; 'tx_ttnews[year]',
                      ),
                      '1' =&gt; array (
                          'GETvar' =&gt; 'tx_ttnews[month]',
                          'valueMap' =&gt; array (
                              'january' =&gt; '01',
                              'february' =&gt; '02',
                              'march' =&gt; '03',
                              'april' =&gt; '04',
                              'may' =&gt; '05',
                              'june' =&gt; '06',
                              'july' =&gt; '07',
                              'august' =&gt; '08',
                              'september' =&gt; '09',
                              'october' =&gt; '10',
                              'november' =&gt; '11',
                              'december' =&gt; '12',
                          ),
                      ),
                  ),
                  'browse' =&gt; array (
                      '0' =&gt; array (
                          'GETvar' =&gt; 'tx_ttnews[pointer]',
                      ),
                  ),
                  'select_category' =&gt; array (
                      '0' =&gt; array (
                          'GETvar' =&gt; 'tx_ttnews[cat]',
                      ),
                  ),
                  'article' =&gt; array(
                      array(
                          'GETvar' =&gt; 'tx_ttnews[pointer]',
                          'valueMap' =&gt; array(),
                          'noMatch' =&gt; 'bypass',
                      ),
                      array(
                          'GETvar' =&gt; 'tx_ttnews[tt_news]',
                          'lookUpTable' =&gt; array(
                              'table' =&gt; 'tt_news',
                              'id_field' =&gt; 'uid',
                              'alias_field' =&gt; 'title',
                              'addWhereClause' =&gt; ' AND NOT deleted',
                              'useUniqueCache' =&gt; 1,
                              'useUniqueCache_conf' =&gt; array(
                                  'strtolower' =&gt; 1,
                                  'spaceCharacter' =&gt; '-',
                              ),
                              'languageGetVar' =&gt; 'L',
                              'languageExceptionUids' =&gt; '',
                              'languageField' =&gt; 'sys_language_uid',
                              'transOrigPointerField' =&gt; 'l18n_parent',
                              'autoUpdate' =&gt; 1,
                              'expireDays' =&gt; 180,
                          ),
                      ),
                      array (
                          'GETvar' =&gt; 'tx_ttnews[swords]',
                      ),
                  ),
              ),
          ),
  </code></pre>
  
  <p><strong>Solution:</strong></p>
  
  <p>Seems that adding <code>addQueryString</code> does the job. Here is my final language switcher:</p>
  
  <pre><code>lib.tslangmenu = COA
  lib.tslangmenu {
    10 = HTML
    10.value(
      &lt;img src="fileadmin/templates/images/languages.png" width="48" height="121" alt="Sprachen" /&gt;
      &lt;div id="LanguageContents"&gt;
    )
  
    20 = HMENU
    20.special = language
    20.wrap = &lt;div id="AvailableLanguages"&gt;|&lt;/div&gt;
    20.special.value = 0,1
    20.addQueryString = 1
    20.1 = GMENU
    20.1.NO {
      XY = 24,16
      5 = IMAGE
      5.file = fileadmin/templates/images/deutsch.png || fileadmin/templates/images/englisch.png || fileadmin/templates/images/kroatisch.png 
    }
  
    20.1.ACT &lt; 20.1.NO
    20.1.ACT = 1
    20.1.ACT.wrap =&lt;span class="langhide"&gt;|&lt;/span&gt; 
    20.1.ACT {
      XY = 24,16
      5 = IMAGE
      5.file = fileadmin/templates/images/deutsch.png || fileadmin/templates/images/englisch.png || fileadmin/templates/images/kroatisch.png 
    }
  
    20.1.CUR &lt; 20.1.ACT
    20.1.CUR = 1
    20.1.CUR{
      XY = 24,16
      5 = IMAGE
      5.file = fileadmin/templates/images/deutsch.png || fileadmin/templates/images/englisch.png || fileadmin/templates/images/kroatisch.png 
    }
  
    30 = HTML
    30.value(
      &lt;img class="languagebutton" src="fileadmin/templates/images/languages.png" width="48" height="121" alt="Sprachen" /&gt;
      &lt;/div&gt;
    )
  }
  </code></pre>