Project

General

Profile

Actions

Bug #96541

closed

LanguageMenuProcessor doesn't seem to work properly

Added by Udo Klingner over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2022-01-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
LanguageMenuProcessor
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

after updating to typo3 v11.5.5, the LanguageMenuProcessor doesn't seem to work properly anymore, available=1 is always displayed, even if there is no translation. 11.5.4 had worked correctly


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #96738: State of language selection in page module not stored across sessionsUnder Review2022-02-03

Actions
Actions #1

Updated by Nico Huber about 2 years ago

I've got the same problem with typo3 11.5.5

Actions #2

Updated by Udo Klingner about 2 years ago

  • Related to Bug #96738: State of language selection in page module not stored across sessions added
Actions #3

Updated by Udo Klingner about 2 years ago

Bug is still present in TYPO3 v11.5.6

Actions #4

Updated by Constantin Horn about 2 years ago

I've bypassed this Bug by checking if the item has a 'link' (Link is empty if the language is not available).
Not fine but it works until the bug is fixed.

Actions #5

Updated by Simon Gilli about 2 years ago

  • Category set to TypoScript
  • Target version set to next-patchlevel
  • Is Regression set to Yes
Actions #6

Updated by Benni Mack about 2 years ago

  • Status changed from New to Needs Feedback

Hey everybody,

Can you please share your

a) site configuration (languages + fallback config)
b) pages datasets (pages.l10n_cfg and $GLOBALS[TYPO3_CONF_VARS][FE][hidePagesIfNotTranslatedByDefault] settings?

Actions #7

Updated by Constantin Horn about 2 years ago

[FE][hidePagesIfNotTranslatedByDefault] = false
Setting it to true made no change

base: /
errorHandling:
  -
    errorCode: 404
    errorHandler: Page
    errorContentSource: 't3://page?uid=99'
languages:
  -
    title: Deutsch
    enabled: true
    languageId: 0
    base: /
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-de
    direction: ltr
    flag: de
    websiteTitle: ''
  -
    title: English
    enabled: true
    base: /en/
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    websiteTitle: ''
    navigationTitle: English
    hreflang: en-US
    direction: ltr
    fallbackType: strict
    fallbacks: ''
    flag: en-us-gb
    languageId: 1
  -
    title: Spanisch
    enabled: true
    base: /es/
    typo3Language: es
    locale: es-ES.UTF-8
    iso-639-1: es
    websiteTitle: ''
    navigationTitle: Español
    hreflang: es-ES
    direction: ltr
    fallbackType: strict
    fallbacks: ''
    flag: es
    languageId: 2
rootPageId: 1

I don't know where to find the pages.l10n_cfg

Actions #8

Updated by Sebastian Schmal about 2 years ago

we have the same Problem:
the Problem is, the "available" is default and all the time on "1"
and, the "current" is all the time too on "1".

see the LanguageMenuProcessor File in Line: 220 and 225
The id 92 and 93 is all the time "1".

its not the Fluid or typoscript problem.

Actions #9

Updated by Thorben Nissen about 2 years ago

I can confirm, that this broke from 11.5.4 to 11.5.5 and I think I found the cause if this issue.

It seems, that the change in https://review.typo3.org/c/Packages/TYPO3.CMS/+/72928/2/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php#610 is the problem.

The first parameter to `$this->sys_page->getPageOverlay` is changed from the page id (int) to the page record (array). In case, there is no overlay the method returns an empty array, when called with the page id, or the original record, when called with an array. A few lines later, `$lRecs` is expected to be empty, if there is no overlay.

This does not only breaks the `LanguageMenuProcessor` but also the TypoScript HMENU with `special = language`, which is used under the hood of the `LanguageMenuProcessor`.

Actions #10

Updated by Benni Mack about 2 years ago

Thorben Nissen wrote in #note-9:

I can confirm, that this broke from 11.5.4 to 11.5.5 and I think I found the cause if this issue.

It seems, that the change in https://review.typo3.org/c/Packages/TYPO3.CMS/+/72928/2/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php#610 is the problem.

The first parameter to `$this->sys_page->getPageOverlay` is changed from the page id (int) to the page record (array). In case, there is no overlay the method returns an empty array, when called with the page id, or the original record, when called with an array. A few lines later, `$lRecs` is expected to be empty, if there is no overlay.

This does not only breaks the `LanguageMenuProcessor` but also the TypoScript HMENU with `special = language`, which is used under the hood of the `LanguageMenuProcessor`.

Hey Thorben,

thanks for the very good insights! Will have a look!

Actions #11

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 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/+/73703

Actions #12

Updated by Gerrit Code Review about 2 years ago

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/+/73703

Actions #13

Updated by Gerrit Code Review about 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/+/73703

Actions #14

Updated by Gerrit Code Review about 2 years ago

Patch set 4 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/+/73703

Actions #15

Updated by Gerrit Code Review about 2 years ago

Patch set 5 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/+/73703

Actions #16

Updated by Gerrit Code Review about 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/+/73786

Actions #17

Updated by Benni Mack about 2 years ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF