TYPO3 Language navigation problem

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
MarjanCvetko
Posts: 1
Joined: 18 Jul 2024, 14:41

TYPO3 Language navigation problem

Post by MarjanCvetko » 02 Jun 2025, 08:12

Hi,
I'm using LanguageMenuProcessor for language menu on the site (used in bootstrap_package):

Code: Select all

40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
40 {
	languages = {$page.theme.language.languageValue}
	as = languagenavigation
}
And then I'm rendering dropdown menu like that:

Code: Select all

<ul class="dropdown-menu">
	<f:for each="{languagenavigation}" as="language">
		<f:if condition="{language.available}">
			<li>
				<a class="dropdown-item" href="{language.link}">
					<div class="paragraphs-description color-text-brand"><f:format.case mode="upper">{language.twoLetterIsoCode}</f:format.case></div>
				</a>
			</li>
		</f:if>
	</f:for>
</ul>
This is supposed to be the standard way to do it in TYPO3, but I'm facing some problems on single product pages, it renders the translation URL as href="/en/product" without the parameters like that href="/en/product/d/demo-product/0".

I've noticed that inside LanguageMenuProcessor class (/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php) in prepareConfiguration() function where its setups $paramsToExclude I'm getting the following parameters as exclusion:

Code: Select all

0 = "ai[action]"
1 = "ai[controller]"
2 = "ai[d_name]"
3 = "ai[d_pos]"
4 = "id"
My best guess is that those parameters should be included, but i don't know why its excluding it.
Anyone else had that problem before? How do I get it to pass Aimeos parameters as well?

User avatar
Metalics
Advanced
Posts: 120
Joined: 13 Jul 2015, 23:59

Re: TYPO3 Language navigation problem

Post by Metalics » 08 Jun 2025, 19:37

Hello,
You should add "typolink.addQueryString = untrusted" parameter for your language menu.
Have a look at the following link:
https://docs.typo3.org/m/typo3/referenc ... uerystring

Post Reply