Project

General

Profile

Actions

Bug #99156

closed

Allow rendering empty language menu if sys_language_uid 0 is disabled in PHP 8.1

Added by J. Peter M. Schuler about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-11-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

On all sites we have a default language menu rendered via the LanguageMenuProcessor.
The typical language config is

0 = de
1 = en

However we have one sites with primary language `en`. However in order to aggregate content and link between sites with a correct url this site has the config
0 = en (disabled)
1 = en

With PHP 8.1 instead of an empty LanuageMenu as output, an exception is thrown: PHP Warning: Trying to access array offset on value of type null in /typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php line 493

Actions #1

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New 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/+/76760

Actions #2

Updated by Gerrit Code Review about 2 years ago

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

Actions #3

Updated by J. Peter M. Schuler about 2 years ago

It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76760

Abandoned 76760 because by error I created two, one broken (76760) and another good one, which I kept: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76761

Actions #4

Updated by J. Peter M. Schuler about 2 years ago

While the patch solves the problem with the exception. The result is still that the pages in that scenario are only displayed to logged in editors, while a public access results in 404. This points to a more complex problem with that site config as a regression from using PHP 8.1. However probably this should be tackled separately.

Actions #5

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

Actions #6

Updated by Gerrit Code Review almost 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/+/76761

Actions #7

Updated by Gerrit Code Review almost 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/+/76779

Actions #8

Updated by J. Peter M. Schuler almost 2 years ago

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

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF