Project

General

Profile

Actions

Bug #88209

closed

Route enhanced parameters not added when using addQueryString

Added by Rudy Gnodde over 5 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2019-04-25
Due date:
% Done:

0%

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

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)


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #91741: RouteEnhancer affects option addQueryString of TypoLinkNew2020-07-03

Actions
Actions #1

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.

Actions #2

Updated by Christian Eßl about 5 years ago

  • Is Regression set to Yes
Actions #3

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".

Actions #4

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!

Actions #5

Updated by Christian Buelter about 4 years ago

I can confirm this issue for TYPO3 10.4.9

Actions #6

Updated by Anonymous almost 4 years ago

  • Related to Bug #91741: RouteEnhancer affects option addQueryString of TypoLink added
Actions #7

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!

Actions #8

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.

Actions #9

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).

Actions #10

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

Actions

Also available in: Atom PDF