Project

General

Profile

Bug #91230

Updated by Josef Glatz about 3 years ago

h1. Problem/Description 

 > Affects 10.4, 11.x 

 A language switcher menu based on the MenuProcessor does not generate the correct URL to the default translation of a mount point page which is localized (also the mounted page is localized). 

 * The problem occurs no matter if I have a language fallback or not. 
 * @pages.mount_pid_ol@ is set value 1 of the mount point page 
 * the mount point page and the mounted page are translated (= page translations exists with different slug) 

 h2. Affected example: 

 # I have a mount point page with URL slug @private-pilotes/how-to-buy@ which results to a URL slug in the frontend of @/en/private-pilotes/how-to-buy/@ (according to the language site configuration (see below)). 
 # This mount point page is translated. The translated URL slug is @privatpiloten/kaufen@ which results to a URL slug in the frontend of @/de/privatpiloten/kaufen/@. 
 # The language menu works correctly if you are on the default language of the mount point page @/en/private-pilotes/how-to-buy/@. Both the link to the default language and the german language is correct and as expected. 
 # But if I'm on the translated mount point page @/de/privatpiloten/kaufen/@ the link to the default language of the page is @/en/privatpiloten/kaufen/@ instead of @/en/private-pilotes/how-to-buy/@ 


 h2. Environment 

 * TYPO3 10.4.1/10.4.2-dev 
 ** didn't tested 9.5 because we updated the instance right from TYPO3 8 LTS where this issue did not occur. Therefore I marked this issue as a regression at least for 10 LTS. 
 * Pagetree with Translation 
 ** default language (english @/en/@) 
 ** second language (german @/de/@) 

 h2. Extract from the site configuration (language part) 

 <pre><code class="yaml"> 
 languages: 
   - 
     title: English 
     enabled: true 
     languageId: '0' 
     base: /en/ 
     typo3Language: default 
     locale: en_CA.UTF-8 
     iso-639-1: en 
     navigationTitle: English 
     hreflang: en-ca 
     direction: ltr 
     flag: ca 
     websiteTitle: '' 
   - 
     title: Deutsch 
     enabled: true 
     base: /de/ 
     typo3Language: de 
     locale: de_DE.utf8 
     iso-639-1: de 
     websiteTitle: '' 
     navigationTitle: '' 
     hreflang: de-de 
     direction: '' 
     fallbackType: fallback 
     fallbacks: '0' 
     flag: de 
     languageId: '1' 
 </code></pre> 


 h2. TypoScript 

 Using the following dataprocessor Configuration 

 <pre> 
			 # Language Navigation 
			 page.10.dataProcessing.450 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor 
			 page.10.dataProcessing.450 { 
				 special = language 
				 special.value = 0,1 
				 as = LanguageNavigation 
				 if { 
					 isTrue = {$site.nav.language.enable} 
				 } 
			 } 
 </pre> 

 h1. Acceptance Criteria  

 A language menu must always link to the correct URL slug of any translation of the actual mount point page no matter which translation of that page is active. 

 --- 

 If there are questions or missing details, please also contact me on TYPO3 slack.

Back