Bug #38476
RoutePart doesn't work with 'complex' uriPattern objects
Status: | Closed | Start date: | 2012-06-29 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 0% |
|
Category: | MVC - Routing | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git master |
Description
I tried to use the RoutePart for a 'complex' object.
Routes.yaml:
- name: 'Single Plausibility Version Actions' uriPattern: 'versionplausibility/{@action}/{version}' defaults: '@package': 'ITC.Collab' '@controller': 'VersionPlausibility' '@action': 'show' routeParts: version: objectType: 'ITC\Collab\Domain\Model\VersionPlausibility' uriPattern: '{version.fork.item.name}/{version.fork.creatorDomain.name}/{version.number}'
Resulting URL:
"http://localhost/versionplausibility/show///-1"
I removed the uriPattern and added a @FLOW3\Identity to a date property of the version class. That did work and routed well! (http://localhost/versionplausibility/show/2012-06-03) So i guess the uriPattern objects aren't correctly resolved
All references to other classes are set and work very well.
History
#1 Updated by Karsten Dambekalns about 3 years ago
- Category set to MVC - Routing
#2 Updated by Karsten Dambekalns over 2 years ago
- Affected Flow version changed from Git 1.2 (master) to Git master
#3 Updated by Bastian Waidelich about 2 years ago
- Status changed from New to Needs Feedback
- Assigned To set to Bastian Waidelich
Hi Pascal,
The object is converted in IdentityRoutePart::createPathSegmentForObject() using \TYPO3\Flow\Reflection\ObjectAccess::getPropertyPath() for each dynamic part..
Could you please debug that part to see where it goes wrong. Alternatively please post a (simplified) version of your models so we can reproduce this. This should work.
#4 Updated by Bastian Waidelich almost 2 years ago
- Status changed from Needs Feedback to Closed
Closing due to missing feedback.
I guess this is fixed in the meantime, feel free to re-open otherwise