Project

General

Profile

Actions

Bug #104664

closed

PHP warning for HMENU browse and unaccessable special.value

Added by Philipp Kitzberger 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2024-08-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
hmenu
Complexity:
Is Regression:
Sprint Focus:

Description

When setting special.value to a non-existing UID or a hidden page the HMENU "browse" produces one of those PHP 8 warnings:

PHP Warning: Undefined array key "pid" in EXT:frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php line 988

974  protected function prepareMenuItemsForBrowseMenu($specialValue, $sortingField, $additionalWhere)
...
988     if ($value_rec['pid']) {
989        // The page record of 'up'.
990        $recArr['up'] = $this->sys_page->getPage((int)$value_rec['pid'], $this->disableGroupAccessCheck);
991     }

Example TypoScript:

page.10 = HMENU
page.10 {
  special = browse
  special.items = next
  special.value = 1234567890
  1 = TMENU
  1.NO {
    wrap = |
  }
}
Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Gerrit Code Review about 1 month ago

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

Actions #5

Updated by Benni Mack about 1 month ago

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

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF