Project

General

Profile

Actions

Bug #99866

closed

Undefined array key "sectionIndex." in AbstractMenuContentObject.php

Added by Benjamin Robinson about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Start date:
2023-02-07
Due date:
% Done:

100%

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

Description

A TypoScript menu with the sectionIndex property
lib.nav = HMENU
lib.nav{
    entryLevel = 0
    1 = TMENU
    1{
        wrap = <ul>|</ul>
        expAll = 1
        NO.wrapItemAndSub = <li>|</li>
    }
    2<.1
    2.sectionIndex = 1
}
… generates the following 4 errors for each content element of TMENU "libnav.2":
  • Core: Error handler (FE): PHP Warning: Trying to access array offset on value of type null in /typo3_src-11.5.22/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 1814
  • Core: Error handler (FE): PHP Warning: Undefined array key "sectionIndex." in /typo3_src-11.5.22/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 1814
  • Core: Error handler (FE): PHP Warning: Trying to access array offset on value of type null in /typo3_src-11.5.22/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 1812
  • Core: Error handler (FE): PHP Warning: Undefined array key "sectionIndex." in /typo3_src-11.5.22/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 1812

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #94707: Undefined array key / Trying to access array offset on value of type null / PHP Version 8.0.8Closed2021-08-04

Actions
Related to TYPO3 Core - Bug #95563: Undefined key warnings in ContentObjectRenderer.phpClosed2021-10-11

Actions
Actions #1

Updated by Benjamin Robinson about 1 year ago

  • Related to Bug #94707: Undefined array key / Trying to access array offset on value of type null / PHP Version 8.0.8 added
Actions #2

Updated by Benjamin Robinson about 1 year ago

  • Related to Bug #95563: Undefined key warnings in ContentObjectRenderer.php added
Actions #3

Updated by Benjamin Robinson about 1 year ago

Temporary workaround:
If the property sectionIndex.type is additionally specified (even if empty) the errors disappear:

lib.nav = HMENU
lib.nav{
    entryLevel = 0
    1 = TMENU
    1{
        wrap = <ul>|</ul>
        expAll = 1
        NO.wrapItemAndSub = <li>|</li>
    }
    2<.1
    2.sectionIndex = 1
    2.sectionIndex.type = 
}

Actions #4

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

Actions #5

Updated by Thomas Hohn about 1 year ago

  • Target version set to Candidate for patchlevel
Actions #6

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

Actions #7

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

Actions #8

Updated by Thomas Hohn about 1 year ago

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

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF