Project

General

Profile

Actions

Bug #88123

closed

menuConfig of LanguageMenuProcessor should be merged with processor configuration in TypoScript

Added by Björn Jacob almost 5 years ago. Updated almost 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

Also available in: Atom PDF