#95072Custom aspect leads to list view on hidden elements
Description
I made a custom aspect for EXT:news for categories.
Everything works as expected but there is a problem with hidden elements or wrong links.
Instead of the error page with the http status 404 the site shows the list view or a server error
@(1/1) Symfony\Component\Routing\Exception\InvalidParameterException
Parameter “xxx” for route “tx_news_pi1_1” must match “.+” (“” given) to generate a corresponding URL.@
I also made an mini extension to see if this is a EXT:news problem but the problem occurs there also.
I tried to separate list and show and tested ‘limitToPages’ with no luck.
The EXT is attached and this is my yaml config:
Test:
type: Extbase
extension: Test
plugin: Test
routes:
-
routePath: '/{title}'
_controller: 'Test::show'
_arguments:
title: test
-
routePath: /
_controller: 'Test::list'
-
routePath: '/{categoryName}'
_controller: 'Test::list'
_arguments:
categoryName: overwriteDemand/categories
defaultController: 'Test::list'
aspects:
title:
type: PersistedAliasMapper
tableName: tx_test_domain_model_test
routeFieldName: slug
categoryName:
type: CategoriesValueMapperReviews 0
No change resolves or names this issue in its commit message, and no comment links one.