Project

General

Profile

Actions

Bug #73493

closed

Check if page really exists for TypoScript "browse" menu

Added by Markus Hölzle about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-02-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi there,

I found a bug in the AbstractMenuContentObject class in line 1103 (TYPO3 version 7.6.3). The TypoScript HMENU "special = browse" ( items = next|prev ) tries to generate links although the page is not accessible because of a TypoScript condition (PIDupinRootline ). This results in an SQL error because 'pid in ()' is not allowed ( will be called in the following function "$this->sys_page->getMenu(...)").

The TYPO3 core check whether the possible site is an array but not whether the array is empty.

\TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject line 1103

// prevsection / nextsection is found
// You can only do this, if there is a valid page two levels up!
if (is_array($recArr['index'])) {

should be changed to:

// prevsection / nextsection is found
// You can only do this, if there is a valid page two levels up!
if (empty($recArr['index']) === false && is_array($recArr['index'])) {

Actions

Also available in: Atom PDF