#95732With Extbase routeEnhancer parameters are stripped
Description
When using a route enhancer for a plugin, e.g. from EXT:news, some parameters are stripped, e.g. in pagination.
I am using this example configuration for EXT:news: https://docs.typo3.org/p/georgringer/news/8.6/en-us/AdministratorManual/BestPractice/Routing/Index.html#human-readable-dates
With this configuration the url news/list/2015/ lists all news of year 2015. In the pagination of the news list, the url to second page is news/list/page-2/, there’s the year parameter missing.
This configuration worked before, but after one TYPO3 update this isn’t working in TYPO3 9 and 10 any more.
In non-speaking url the parameter isn’t stripped: news/list/?tx_news_pi1%5B%40widget_0%5D%5BcurrentPage%5D=2&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5BoverwriteDemand%5D%5Byear%5D=2015&cHash=...
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
Sven Burkert commented 10/22/21, 11:39
-
Oliver Hader commented and changed status
NewNeeds Feedback 11/03/22, 12:26Might have been related to
'defaults'being applied by routing. Are there any chances, you could still find and post the complete/relevant route enhance configuration? Thanks in advance! -
Sven Burkert commented 11/04/22, 10:52
Hi @ohader,
I used the example configuration of EXT:news: https://docs.typo3.org/p/georgringer/news/8.6/en-us/AdministratorManual/BestPractice/Routing/Index.html#human-readable-dates
Error occurs in ViewHelper f:widget.link when not adding
addQueryStringMethod="GET". -
Oliver Hader commented and changed Tags
realurl, routeEnhancer, speaking url, slugpending-close 11/12/22, 09:59Thanks for the feedback. I looks like this has been changed in
ext:newstemplates already (https://github.com/georgringer/news/blob/8.6.0/Resources/Private/Templates/ViewHelpers/Widget/Paginate/Index.html#L42-L44).Route generation cannot resolve that automatically, since for using HTTP method
POSTthe relevant page param value is not handed over at all when generating the corresponding URL.I guess we can close this issue, can’t we?
-
Sven Burkert commented 11/12/22, 19:10
Hi @ohader,
I still think it’s a TYPO3 bug:
Non-speaking url works. But speaking url (with correct configuration) isn’t working. You have to change the Fluid template (!) to make it work.
Btw I do not understand your answer:
> Route generation cannot resolve that automatically, since for using HTTP method POST the relevant page param value is not handed over at all when generating the corresponding URL.
1) In this case, we don’t use POST
2) addQueryStringMethod=POST is deprecated -
Georg Ringer commented and changed status
Needs FeedbackClosed 04/18/25, 06:30Hey Sven,
I can second what Oliver Hader states. and yes sometimes the fluid templates need to be changed to achieve a certain behavior.
Now it is working. I’ve overwritten the paginate template (EXT:news\Resources\Private\Templates\ViewHelpers) and it seems there were some changes (https://github.com/georgringer/news/commit/5d0309a0ff4a7b4526fca9e37c1afef4f7d3e467#diff-2cf3d471e065ca0d93bc1ac8d25096f0ccee42862ca217e7b1cfc36753bec926):
Why do I need addQueryStringMethod=GET here? Isn’t it “GET” by default? Why is the non-speaking url working without this?