Project

General

Profile

Actions

Bug #94713

closed

HMENU always includes L parameter

Added by Tizian Schmidlin over 2 years ago. Updated over 1 year 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 #1

Updated by Tizian Schmidlin over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Tizian Schmidlin over 2 years ago

  • Description updated (diff)
Actions #3

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback

Are you using confg.linkVars = L ?

Actions #4

Updated by Gerrit Code Review over 2 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72801

Actions #5

Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72801

Actions #6

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72789

Actions #7

Updated by Benni Mack over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF