Project

General

Profile

Actions

Bug #94713

closed

HMENU always includes L parameter

Added by Tizian Schmidlin over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Start date:
2021-08-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
menu
Complexity:
Is Regression:
Sprint Focus:

Description

Hello there,

we ran into a weird issue on a system we recently updated to TYPO3 10.

We use HMENU to build the language navigation, as this part was not rebuilt during the update.

The configuration looks like this: Show typoscript

What happens is, that if I add any parameter to the page URL, the page would load as usally, when I then switch the language, the parameter stays. Excluding any parameter solves this but this is ignored with the L parameter. Additionally, the language navigation is cached with this parameter until the next time the cache is stale, which means lots and lots of links with a L=X parameter attached to them through the site.

Luckily, the L parameter does not affect the rendering of the content, as this is properly managed via the language that is detected in the URL (e.g. /de/, /fr/, ...) but other HMENU items on the page, that are also told to ignore the L parameter do not follow this rule and simply append the parameter when building the URL.

This is how the main menu is built: Show typoscript

The lib.navBarMenu.1.NO.typolink.addQueryString = 0 works for every other parameter that I can throw at the URL but the L-parameter is always appended.

I guess this is a bug in how HMENU builds it's URLs with typolink and just does not check for typolink.addQueryString (but it should, according to the documentation).

I'll try to look into it myself and provide a patch if I come around but maybe somebody else already knows how to solve this differently, in which case I'll be happy with it, too.

Actions

Also available in: Atom PDF