From ef08345d848fad54ed799ff3b0126b9ac5e3bab9 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Wed, 8 Jan 2020 21:49:11 +0100
Subject: [PATCH] [BUGFIX] Revert Use existing API instead of
 ContentObjectRenderer"

This reverts commit 47e63fc33c7dd45111465d833216eb474f224b9e
because of regressions.

Resolves: #89989
Reverts: #88344
Releases: master, 9.5
Change-Id: I1f43d0f343484366e81581435bdb418cfebf317a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62832
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
---
 .../Classes/ContentObject/Menu/AbstractMenuContentObject.php  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
index 4886250c7312..9193ed6e6d86 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
@@ -684,8 +684,8 @@ abstract class AbstractMenuContentObject
                 $id = $mount_info['mount_pid'];
             }
             // Get sub-pages:
-            $rows = $this->sys_page->getMenu($id, '*', $sortingField);
-            foreach ($rows as $row) {
+            $statement = $this->parent_cObj->exec_getQuery('pages', ['pidInList' => $id, 'orderBy' => $sortingField]);
+            while ($row = $statement->fetch()) {
                 $tsfe->sys_page->versionOL('pages', $row, true);
                 if (!empty($row)) {
                     // Keep mount point?
-- 
GitLab