Bug #67085
closedlanguage menu uses incorrect active state
0%
Description
I wanted to create the hreflang tags for a website with 3 different languages: de-DE (default language), de-AT, de-CH.
de-AT and de-CH shall show the complete content of de-DE if there is no translation of the page. So I set hidePagesIfNotTranslatedByDefault to false.
I used this TypoScript:
page.headerData.40 = HMENU page.headerData.40 { special = language special.value = 0,1,2 1 = TMENU 1 { NO = 1 NO { doNotLinkIt = 1 stdWrap.cObject = TEXT stdWrap.cObject.value = de-DE || de-AT || de-CH linkWrap = <link rel="alternate" hreflang="| after.cObject = TEXT after.cObject { stdWrap { wrap = " href="|" /> typolink { parameter.data = page:uid additionalParams = &L=0 || &L=1 || &L=2 returnLast = url forceAbsoluteUrl = 1 addQueryString = 1 } } } } ACT = 1 ACT.doNotShowLink = 1 } }
Now the problem:
If I'm on the e.g. de-CH page without any translation, de-DE is the ACT item.
I checked the language id with GP:L
and it is set to 2. So IMHO de-CH should be ACT and not de-DE.
I hope you understand what I mean.
Updated by Stefan M. over 9 years ago
Damn.. I forgot to set a good issue title.. :)
Updated by Mathias Schreiber over 9 years ago
- Subject changed from language menu to language menu uses incorrect active state
Updated by Frederic Gaus over 9 years ago
I tested your Typoscript. For me everything works perfectly well. I am unable to reproduce.
Nevertheless in the first moment I thought I was able to reproduce the issue. But then I noticed that my language configuration was not complete. Do you have a complete language configuration similar to this one…
config { uniqueLinkVars = 1 linkVars := addToList(L(1-3),print) sys_language_uid = 0 sys_language_overlay = 1 sys_language_overlay = hideNonTranslated sys_language_mode = content_fallback #sys_language_mode = strict language = de locale_all = de_DE.utf8 htmlTag_langKey = de } ## AT [globalVar = GP:L = 1] config { sys_language_uid = 1 language = at locale_all = de_AT.utf8 htmlTag_langKey = at } [global] ## CH [globalVar = GP:L = 2] config { sys_language_uid = 2 language = ch locale_all = de_CH.utf8 htmlTag_langKey = ch } [global]
Updated by Frederic Gaus over 9 years ago
- Status changed from New to Needs Feedback
Updated by Stefan M. over 9 years ago
My configuration looks similar except:
sys_language_overlay = 1 sys_language_overlay = hideNonTranslated sys_language_mode = content_fallback
So I added those lines of Typoscript.
Now the active state seems to stop working on CH and AT.
On DE the hreflang for DE was removed. On CH and AT all 3 hreflang are shown.
Updated by Riccardo De Contardi about 9 years ago
Stefan, is this reproducible on the latest 6.2.15 or the latest 7 master?
Updated by Stefan M. about 9 years ago
On 6.2.15 it's still reproducable. On 7 I couldn't test it yet.
Updated by Alexander Opitz over 8 years ago
- Status changed from Needs Feedback to New
- Target version set to next-patchlevel
Updated by Benni Mack about 6 years ago
- Status changed from New to Needs Feedback
We implemented href-lang inside the new EXT:seo extension in v9, and also overcame the issue with the proper language configuration via Site Handling. Can you check if this issue still exists? Otherwise we'll close the ticket in a few weeks.
Updated by Riccardo De Contardi almost 6 years ago
- Status changed from Needs Feedback to Closed
- Target version deleted (
next-patchlevel)
No feedback since the last 90 days => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards