Bug #88123
closedmenuConfig of LanguageMenuProcessor should be merged with processor configuration in TypoScript
100%
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.
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
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
Updated by Daniel Gohlke over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d85876bcf546c0b9e86fbfd2f24633f50fc5671b.
Updated by Christian Eßl about 5 years ago
- Related to Bug #87764: Bug in building menu configuration in LanguageMenuProcessor added