Issue Bug Rejected

#105941addQueryString not working

Marc Harding 01/15/25, 13:28 updated 02/10/25, 23:10

Description

It seems to me, that the addQueryString option does not always work as excepted.

I’m using the news extension and users can filter the news by their assigned categories.
That works fine, but the selected category is not present in the pagination URLs.
It works when i add a routeEnhancers.

My problem is, that users can filter by multiple categories and building a routeEnhancers for that is quite complicated, so i’d like to just use the unresolved query string.

This is probably because of [[https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98488-TypolinkOptionAddQueryStringOnlyIncludesResolvedQueryArguments.html]] .

Just adding ‘unstrusted’ instead of ‘1’ sadly is not working for me: e. g.{f:uri.action(action:actionName, arguments:{currentPage: pagination.previousPageNumber}, addQueryString: ‘unstrusted’)} does not add the additional query string.

Example:

Current URL: example.com/news/?tx_news_pi1%5Bcontroller%5D=Category&tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D=100&cHash=73cca….

Fluid: {f:uri.action(action:actionName, arguments:{currentPage: 1}, addQueryString: ‘unstrusted’)}

Result: example.com/news/?tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5BcurrentPage%5D=1&cHash=1ec1….

Expected result: example.com/news/?tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5BcurrentPage%5D=1&tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D=100&cHash=1ec1…

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.