I’m struggling with a routing problem. I’ve added a slug-field to the TCA and added the configuration to the config.yaml. In the frontend the urls are generated correctly but when I click on the Link the default 404 error page shows up.
This is the routeEnhancer in the config.yaml
TracepartsDetail:
type: Extbase
extension: Traceparts
plugin: Api
limitToPages:
- 348
- 569
- 429
- 472
- 473
- 475
routes:
- routePath: '/api/{product_slug}'
_controller: 'Traceparts::show'
_arguments:
product_slug: product
defaultController: 'Traceparts::index'
aspects:
product_slug:
type: PersistedAliasMapper
tableName: tx_traceparts_domain_model_product
routeFieldName: path_segment
And this is the fluid template.
<f:link.action action="show" controller="Traceparts" extensionName="Traceparts" pluginName="Api" arguments="{product:product.repositoryProduct.uid}">{product.apiProduct.title}</f:link.action>
If I change the routeFieldName to “uid” everything works fine.
Any idea whats wrong? Or at least how to debug?
Kind regards, Cornel
New contributor
C. Widmer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.