Bug #82507

using menu.directory with an invalid level argument renders the top level

Added by Markus Klein 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Fluid Styled Content
Start date:
2017-09-19
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

using

<ce:menu.directory entryLevel="123" ...> ... </ce:ce:menu.directory>

will return the top-level pages if level 123 does not exist.

This causes weird side-effects as it may expose other websites in the same instance.

Associated revisions

Revision 35c3cb36 (diff)
Added by Markus Klein 8 months ago

[BUGFIX] Correctly handle non-existing level in menu.directory VH

Providing a non-existing entry-level to the getPageUids() method
now returns an empty array instead of an array with key zero and
a null value.

This way we can correctly stop processing in the viewhelpers
using the MenuViewHelperTrait.

Resolves: #82507
Releases: 7.6
Change-Id: I99a610e612545648d7637e4a441dcdd1b1e51adc
Reviewed-on: https://review.typo3.org/54167
Tested-by: TYPO3com <>
Reviewed-by: Johannes Kasberger <>
Tested-by: Johannes Kasberger <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Gerrit Code Review 8 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54167

#2 Updated by Markus Klein 8 months ago

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

Also available in: Atom PDF