Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I had a problem with the language menu generation -> wrong link value for default language [TYPO3 9] #2

Open
Dominik-Sch opened this issue Aug 18, 2022 · 0 comments

Comments

@Dominik-Sch
Copy link

[TYPO3 - 9.5.15]
[PHP 7.2.34]

The link value of the default language had the same value of the current language in the language menu.

20 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
20 {
     languages = auto
     as = languageNavigation
}

Example:

domain.de/

language menu {
    de = "/"
    en = "/en/"
    es = "/es/"
}

domain.de/en/

language menu {
    de = "/en/"
    en = "/en/"
    es = "/es/"
}

domain.de/es/

language menu {
    de = "/es/"
    en = "/en/"
    es = "/es/"
}

I added two lines of code to fix my problem.
https://github.com/studiomitte/urlguard2/blob/master/Classes/Xclass/ContentObjectRenderer9Xclassed.php

if ($pageArguments instanceof PageArguments) {
    $LParam = $newQueryArray['L']; // save L parameter
    $newQueryArray = array_intersect($pageArguments->getRouteArguments(), $newQueryArray);
    $newQueryArray['L'] = $LParam; // add L parameter to $newQueryArray
}

I'm not 100% sure if this is a bug, or I have a configuration error on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant