Bug #88209
closedRoute enhanced parameters not added when using addQueryString
0%
Description
When using addQueryString in a typolink or link ViewHelper the parameters of a route enhanced URL aren't added.
For example: I have a news detail page with the URL https://domain.tld/news/article/news-title. If I add a typolink to that page with "addQueryString = 1" I get the URL https://domain.tld/news
The TypoScript I used to test this is:
lib.test = TEXT lib.test { value = Test typolink { parameter = 9 addQueryString = 1 } }
The route enhancement is done with the following configuration in the site config:
News: type: Extbase limitToPages: - 9 extension: News plugin: Pi1 routes: - { routePath: '/article/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} } defaultController: 'News::detail' aspects: news_title: type: PersistedAliasMapper tableName: tx_news_domain_model_news routeFieldName: path_segment
This is also a problem in the f:link.page ViewHelper (and probably other link, form and uri ViewHelpers)
Updated by Rudy Gnodde over 5 years ago
If I set addQueryString.method = GET (or in the ViewHelpers addQueryStringMethod="GET") it does work. The problem is that by default it uses the QUERY_STRING environment variable in TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getQueryArguments. The route enhancer doesn't add the parameters to this variable.
Updated by Sven Burkert about 5 years ago
Same here. I'm using newest TYPO3 version (9.5.11).
Thx @Rudy for the useful hint with addQueryStringMethod="GET".
Updated by Claus Fassing about 4 years ago
I run into the same issue with TYPO3 version 9.5.20
This happens in connection with a login and the redirection on a news detail page
Many thanks to Rudy Gnodde for the workaround hint!
Updated by Christian Buelter about 4 years ago
I can confirm this issue for TYPO3 10.4.9
Updated by Anonymous almost 4 years ago
- Related to Bug #91741: RouteEnhancer affects option addQueryString of TypoLink added
Updated by Kevin von Spiczak almost 4 years ago
I have the same issue (running TYPO3 9.5.23), thanks for the workaround @Rudy Gnodde!
Updated by Rudy Gnodde over 3 years ago
- TYPO3 Version changed from 9 to 10
No longer an issue in TYPO3 11, as the method parameter has been removed completely and it's always GET. But still an issue in TYPO3 9 and 10.
Updated by Henrik Ziegenhain almost 3 years ago
Thanks for this workaround. It took me a while to figure out, that "addQueryString" does not include all _GET-params by default (TYPO3 v10).
Updated by Georg Ringer 6 months ago
- Status changed from New to Closed
ad it is not an issue anymore in 11+ and 10 is not under active support anymore, closing it now