Project

General

Profile

Actions

Bug #88344

closed

HMENU directory incompatible with free mode

Added by Andreas Kießling over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-05-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When TYPO3 is set to run in Free mode, HMENU of type directory stop working for localized pages.
The query to fetch the subpages uses exec_getQuery from the ContentObjectRenderer, thus \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getLanguageRestriction is applied and the pages with the required languages are fetched directly.

In theory, this behaviour is correct, since it returns what it was configured for for, but pages is a special case, where at some points the overlay information from _PAGES_OVERLAY and _PAGES_OVERLAY_LANGUAGE is checked, as well as the page id differs to what the router returns.
See \TYPO3\CMS\Frontend\Page\PageRepository::isPageSuitableForLanguage for the mentioned checks.

It seems like replacing the exec_getQuery with the already existing API does the job, see \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForDirectoryMenu

            // Get sub-pages:
//            $statement = $this->parent_cObj->exec_getQuery('pages', ['pidInList' => $id, 'orderBy' => $sortingField]);
//            while ($row = $statement->fetch()) {

            $rows = $this->sys_page->getMenu($id, '*', $sortingField);
            foreach ($rows as $row) {

Related issues 8 (0 open8 closed)

Related to TYPO3 Core - Bug #89368: Active page Closed2019-10-08

Actions
Related to TYPO3 Core - Bug #89038: HMENUs special "directory" does not work properly with sites fallbackType "free"Closed2019-08-29

Actions
Related to TYPO3 Core - Bug #89989: Since v9.5.12 extendToSubpages has no effect for subpages in menusClosed2019-12-18

Actions
Related to TYPO3 Core - Bug #88685: With "Hide default translation of page" no link for alternate language is generatedClosed2019-07-04

Actions
Related to TYPO3 Core - Bug #85987: Menus doesn't respect language settings and show non translated pagesClosedBenni Mack2018-08-27

Actions
Related to TYPO3 Core - Bug #88987: Menu Generation Fails on Translated WebsitesClosed2019-08-20

Actions
Related to TYPO3 Core - Bug #90971: HMENU regression in 9.5.12Closed2020-04-07

Actions
Related to TYPO3 Core - Bug #93014: translation for navigation is incomplete in free mode since v9.5.16Closed2020-12-07

Actions
Actions #1

Updated by Christian Eßl about 5 years ago

Actions #2

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Michael Binder almost 5 years ago

I had the same problem and your solution works well, thank you for that.
I also tested it with the other fallback types and the menu is always displayed correctly. So I made a patch and sent it to Gerrit.

Actions #4

Updated by Anonymous almost 5 years ago

  • Related to Bug #89038: HMENUs special "directory" does not work properly with sites fallbackType "free" added
Actions #5

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch 9.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/+/62466

Actions #6

Updated by Michael Binder almost 5 years ago

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

Updated by Andreas Kießling almost 5 years ago

Thanks Michael for taking care! :D

Actions #8

Updated by Georg Ringer almost 5 years ago

  • Related to Bug #89989: Since v9.5.12 extendToSubpages has no effect for subpages in menus added
Actions #9

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #10

Updated by Benni Mack almost 5 years ago

  • Related to Bug #88685: With "Hide default translation of page" no link for alternate language is generated added
Actions #11

Updated by Benni Mack almost 5 years ago

  • Related to Bug #85987: Menus doesn't respect language settings and show non translated pages added
Actions #12

Updated by Georg Ringer over 4 years ago

  • Related to Bug #88987: Menu Generation Fails on Translated Websites added
Actions #13

Updated by Georg Ringer over 4 years ago

  • Related to Bug #90971: HMENU regression in 9.5.12 added
Actions #14

Updated by Alexander Bohn almost 4 years ago

  • Related to Bug #93014: translation for navigation is incomplete in free mode since v9.5.16 added
Actions

Also available in: Atom PDF