Bug #86999
closedrouteEnhancers type: Simple destroy extbase action/controller in url
0%
Description
Tested with 9.5.1 and 9.5.2-dev
When using routeEnhancers with type Simple in combination with an extbase action (f:link.action), the resulting url dont works.
My local test setup:
Extension: example Controller: ArticleThree Action: list
sites/test/config.yaml
routeEnhancers: PageAjax: type: Simple routePath: '/category/{category}' requirements: category: '[0-9]{1,8}'
fluid template
<f:link.action action="list" additionalParams="{category: 5}">list</f:link.action>
link generated without routeEnhancers: (Working)¶
ajax-test-3?category=5&tx_example_articlethree%5Baction%5D=list&tx_example_articlethree%5Bcontroller%5D=ArticleThree&cHash=546efd88b712e697c967f9aa4c8ec0a9
link generated with routeEnhancers: (Not Working)¶
ajax-test-3/category/5?sd1e81ff39e3713ebae2d89f73379a55=ArticleThree&tx_example_articlethree__action=list&cHash=354058dfabfeb54b8dbc412b598cccba
The brackets are replaced with underscore:
tx_example_articlethree__action=list
There is a strange "hash" in front of ControllerName:
sd1e81ff39e3713ebae2d89f73379a55=ArticleThree
Without an extbase action, everything is working: (f:link.page)¶
<f:link.page additionalParams="{category: 5}">list</f:link.action> ajax-test-3/category/5?cHash=24e9e862dd2e53ce060a6137ad759140
Updated by Benni Mack about 5 years ago
It is intended that the default enhancers cannot be combined (as documented here) https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html#description - however it is possible to write custom enhancers that match combinations of two plugins / argument types (e.g. Simple + Extbase).
The docs also describe how to write custom enhancers.
In this case, you might want to check how the Decorator Enhancers can be combined with other Enhancers in general, so this might be a starting point.
So this is not a bug really, only a technical limitation that has not been solved by TYPO3 Core for the following reasons:
- We consider this an edge-case for specific setups where a generic solution is hard to provide to solve all needs
- Multiplying enhancers raises complexity with a lot of definitions that need to be solved (which enhancer is expected to do its work first, what happens if one can fulfil its task, the other should just add their parts after that?)
- Having optional arguments (thus, possible to have optional URL path segments) combined (= empty / optional paths in between) is not supported by Symfony Routing underneath
Just as a reference: This worked with RealURL, but only because RealURL did some guessing on how parameters are shifted and merged together, and one could easily build multiple URLs showing the same content, effectively creating .
Updated by Steffen Hastädt about 5 years ago
But isn't it still a bug that the simple enhancer encodes the extbase parameters in a way that the URL is broken?
ajax-test-3/category/5?sd1e81ff39e3713ebae2d89f73379a55=ArticleThree&tx_example_articlethree__action=list&cHash=354058dfabfeb54b8dbc412b598cccba
Updated by Susanne Moog almost 5 years ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader almost 5 years ago
- Related to Bug #89647: Forms routing not working because of option 'deflatedParameters' added
Updated by Oliver Hader almost 5 years ago
- Status changed from New to Needs Feedback
tx_example_articlethree[controller]was longer than 32 characters and therefor had to be encoded internally to meet Symfony's route specifications - that's the reason why this strange hash had been applied.
This issue has been addresse in issue #87688 in TYPO3 v9.5.12
Please report back, whether this issue still exists.
Thanks in advance!
Updated by Oliver Hader almost 5 years ago
- Status changed from Needs Feedback to Closed