Project

General

Profile

Actions

Bug #95732

open

With Extbase routeEnhancer parameters are stripped

Added by Sven Burkert over 2 years ago. Updated over 1 year ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-10-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
pending-close
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Sven Burkert over 2 years ago

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

<f:widget.link addQueryStringMethod="GET" 

Why do I need addQueryStringMethod=GET here? Isn't it "GET" by default? Why is the non-speaking url working without this?

Actions #2

Updated by Oliver Hader over 1 year ago

  • Status changed from New to Needs Feedback

Might 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!

Actions #3

Updated by Sven Burkert over 1 year ago

Hi @Oliver Hader,

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

Actions #4

Updated by Oliver Hader over 1 year ago

  • Tags changed from realurl, routeEnhancer, speaking url, slug to pending-close

Thanks for the feedback. I looks like this has been changed in ext:news templates 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 POST the 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?

Actions #5

Updated by Sven Burkert over 1 year ago

Hi @Oliver Hader,

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

Actions

Also available in: Atom PDF