Bug #92631
Updated by Jarvis H over 3 years ago
*Typo3 Version*: 9.5.20
*Composer mode*: yes
*Problem description*
When using records which contain a leading number in the record slug, url routing for detail/show action leads to the following error:
@#1298012500 TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException@
@Required argument "job" is not set for VendorName\PluginName\Controller\JobController->show.@
@in /path-to-site/typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php line 414@
An example of a url which causes the error:
@https://some-domain.com/jobs/detail/30-lorem-ipsum-job-slug/@
Route config looks like this:
<pre><code class="yaml">
routeEnhancers:
Job:
type: Extbase
namespace: tx_xyjobs_pi1
routes:
-
routePath: '/{jobtitle}'
_controller: 'Job::show'
_arguments:
jobtitle: job
-
routePath: '/job-page/{page}'
_controller: 'Job::list'
_arguments:
page: '@widget_0/currentPage'
defaultController: 'Job::list'
defaults:
page: '1'
aspects:
page:
type: StaticRangeMapper
start: '1'
end: '1000'
jobtitle:
type: PersistedAliasMapper
tableName: tx_xyjobs_domain_model_job
routeFieldName: slug
</code></pre>
This issue also occurs in the News extension.
I may be missing something, but surely this is not the desired behaviour?