#108587Undefined array key warning in AbstractMenuContentObject language menu processing
Description
When using HMENU with special = language and manually specifying language IDs in special.value (e.g., `special.value = 1,2,3`) , if any of the specified language IDs don’t exist in the site’s language configuration, a PHP warning is thrown:
PHP Warning: Undefined array key 1 in
/var/www/html/vendor/typo3/cms-frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 580
This occurs in the prepareMenuItemsForLanguageMenu() method when the code tries to access $languages[$sUid] without first checking if the key exists in the array. The issue happens when special.value is not set to ‘auto’ and contains language IDs that aren’t configured in the site.
Reviews 2
History 59
-
Gerrit Code Review pushed patch set 1 for main to change 92239 status
NewUnder Review <span data-processor="relativetime" data-value="2026-01-01T11:32:16+00:00" > 01/01/26, 11:32 </span> -
Gerrit Code Review pushed patch set 2 for main to change 92239 <span data-processor="relativetime" data-value="2026-01-01T13:15:12+00:00" > 01/01/26, 13:15 </span>
-
Simon Schaufelberger commented <span data-processor="relativetime" data-value="2026-01-01T16:41:21+00:00" > 01/01/26, 16:41 </span>
-
Himanshu Ramavat commented <span data-processor="relativetime" data-value="2026-01-02T05:32:19+00:00" > 01/02/26, 05:32 </span>
Simon Schaufelberger wrote in #note-3:
> is this only TYPO3 14? Do you have a website running already on v14?I currently have a website running on TYPO3 v11 and encountered this issue while preparing the upgrade to v13.
The problem occurs when special.value contains language IDs that are not present in the site language configuration, which leads to accessing a non-existing $languages[$sUid] .
The relevant code in v13 and v14 is identical , which is why I selected TYPO3 version 14 in the ticket. However, the issue is also present in TYPO3 v13 .
-
Gerrit Code Review pushed patch set 3 for main to change 92239 <span data-processor="relativetime" data-value="2026-01-02T19:45:35+00:00" > 01/02/26, 19:45 </span>
-
Himanshu Ramavat commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-01-04T21:00:09+00:00" > 01/04/26, 21:00 </span>Applied in changeset commit:2af335c1002622b986f068bab1b30f12b10ca503.
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 92450 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-01-22T06:35:17+00:00" > 01/22/26, 06:35 </span> -
Himanshu Ramavat commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-01-22T07:00:08+00:00" > 01/22/26, 07:00 </span>Applied in changeset commit:1928ca115580e4f45ea9f4ed084056f1095272e1.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-03-31T08:59:39+00:00" > 03/31/26, 08:59 </span>
is this only TYPO3 14? Do you have a website running already on v14?