Project

General

Profile

Actions

Bug #88123

closed

menuConfig of LanguageMenuProcessor should be merged with processor configuration in TypoScript

Added by Björn Jacob over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-04-09
Due date:
% Done:

100%

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

Description

Use case

Imagine the following use case. We are having a page with a plugin listing news entries. The limit per page is 10. A pagination is available. The amount of news entries differs between the languages. In the default language, there are 38 entries and therefore 4 pages in the pagination. The translated version only contains 27 entries. Thus, there are 3 pages in the pagination. If a user is on page 4 and switches to the translated version, an error 404 occurs. In order to avoid this, a solution could be to exclude the pagination parameter in the url of the LanguageMenuProcessor.

TypoScript example


20 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
20 {
  languages = auto
  as = languageNavigation
  addQueryString.exclude = tx_news_pi1[@widget_0][currentPage]
}

Current behaviour

The excluded URL parameter (tx_news_pi1[@widget_0][currentPage]) is not available within the menuConfig array of the LanguageMenuProcessor. Since the menuConfig already contains a addQueryString property, the one set via TypoScript is ignored.

Expected behaviour

Setting the configuration via TypoScript is taken into account by the LanguageMenuProcessor. Codewise, this can be achieved by merging the array instead of creating a union.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #87764: Bug in building menu configuration in LanguageMenuProcessor Closed2019-02-21

Actions
Actions #1

Updated by Gerrit Code Review over 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/+/60432

Actions #2

Updated by Gerrit Code Review over 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/+/60434

Actions #3

Updated by Daniel Gohlke over 5 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Christian Eßl about 5 years ago

  • Related to Bug #87764: Bug in building menu configuration in LanguageMenuProcessor added
Actions

Also available in: Atom PDF