I want to be able to call blogpost entries by their slug, which is made of their title, through a routeEnhancer
. The slug is generated correctly, but calling the URL results in a PageNotFoundException
with the error message:
Request parameters could not be validated (&cHash empty)
And with links generated with Fluid:
<f:link.action action="show" arguments="{'blogpost': blogpost}" pageUid="{settings.ShowPid}">Weiterlesen</f:link.action>
... I get The requested page does not exist
Using TYPO3 9.5.16
Here's my config:
setup.typoscript
plugin.tx_exblog {
config {
defaultGetVars = 0
}
features {
requireCHashArgumentForActionArguments = 0
}
}
site/config.yaml
routeEnhancers:
NewsPlugin:
type: Extbase
extension: ExBlog
plugin: Show
routes:
- { routePath: '/{title}', _controller: 'Blogpost::show', _arguments: { title: blogpost } }
defaultController: 'Blogpost::teaser'
aspects:
title:
type: PersistedAliasMapper
tableName: 'tx_exblog_domain_model_blogpost'
routeFieldName: 'slug'
routeValuePrefix: '/'
TCA
'slug' => [
'label' => 'slug',
'exclude' => true,
'config' => [
'type' => 'slug',
'generatorOptions' => [
'fields' => ['title'],
'fieldSeparator' => '/',
'prefixParentPageSlug' => true,
'replacements' => [
'/' => '',
],
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInSite',
],
]
ext_tables.sql
slug varchar(255) DEFAULT '' NOT NULL,
Any ideas as to what am I missing?