Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
In the error log I get the following Error:
Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
#0 /home/httpd/vhosts/frakmont.com/www/frakmont.com/frakmont.com/public/typo3/sysext/core/Classes/Routing/UrlGenerator.php(55): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'ai_0', 1, Array, Array)
I can't 100% say how to reproduce the error. I got it after an update but it also appeared before the update.
I'm getting the error, when I try to open the Basket in the FE. In the FE I get the "an unrecoverable exception occured" and an the log I get the error above.
I've read the following Post ((Solved) Symfony\Component\Routing\Exception\InvalidParameterException) which is similar but not the same.
I've tried to remove the RoutEnhancers which fixed the Problem. Then I started to remove parts of the RouteEnhancer and after I removed the following Part of the RouteEnhancer the error was gone.
It works now, but i still don't know why the error occured and if its a bug or a configuration problem. Is this a TYPO3 Routing Problem?
I'm using:
TYPO3 10.4.21
Aimeos 21.10.2
PHP 7.4
Apache Webserver
Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
#0 /home/httpd/vhosts/frakmont.com/www/frakmont.com/frakmont.com/public/typo3/sysext/core/Classes/Routing/UrlGenerator.php(55): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'ai_0', 1, Array, Array)
I can't 100% say how to reproduce the error. I got it after an update but it also appeared before the update.
I'm getting the error, when I try to open the Basket in the FE. In the FE I get the "an unrecoverable exception occured" and an the log I get the error above.
I've read the following Post ((Solved) Symfony\Component\Routing\Exception\InvalidParameterException) which is similar but not the same.
I've tried to remove the RoutEnhancers which fixed the Problem. Then I started to remove parts of the RouteEnhancer and after I removed the following Part of the RouteEnhancer the error was gone.
Code: Select all
-
routePath: '/b/{b_action}'
_controller: 'Basket::index'
I'm using:
TYPO3 10.4.21
Aimeos 21.10.2
PHP 7.4
Apache Webserver
Re: Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
This seems to be one of those nasty TYPO3 routing bugs.
Can you create a bug report at https://forge.typo3.org ?
Can you create a bug report at https://forge.typo3.org ?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
Okay I've added the bud report here: https://forge.typo3.org/issues/96165
I hope I've added all the neccessary information.
I hope I've added all the neccessary information.
Re: Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
I did some fruther testing and I've realised the route which make the error is actually the following
I don't know why it it did work when I tested it the first time. Maybe there was something haning left in the cache..
Anyways...
So after futher debugging, I found out, that the issue only occurs if I set a category on the catalog list plugin. If I choose a category then the f_name GET paramet is empty during the url building process.
the $params are set here (https://github.com/aimeos/ai-client-htm ... d.php#L395) which in my case is "null" and then it passes a "null" to the TYPO3 URL generator, which then throws an error.
I've set the settings.client.html.catalog.lists.catid-default config which doesn't make any difference.
Any ideas why this happens if I choose a category?
I assume this is not a typo3 urlGenerator problem, since aimeos delivery a value with "null" to the builder?
Code: Select all
-
routePath: '/c/{f_name}~{f_catid}'
_controller: 'Catalog::list'
Anyways...
So after futher debugging, I found out, that the issue only occurs if I set a category on the catalog list plugin. If I choose a category then the f_name GET paramet is empty during the url building process.
the $params are set here (https://github.com/aimeos/ai-client-htm ... d.php#L395) which in my case is "null" and then it passes a "null" to the TYPO3 URL generator, which then throws an error.
I've set the settings.client.html.catalog.lists.catid-default config which doesn't make any difference.
Any ideas why this happens if I choose a category?
I assume this is not a typo3 urlGenerator problem, since aimeos delivery a value with "null" to the builder?
Re: Error: Parameter "ai__f_name" for route "ai_0" must match "[^/~]++" ("" given) to generate a corresponding URL.
Seems like the problem has been fixed a few days ago but it's not part of an official release yet:
https://github.com/aimeos/ai-client-htm ... 1d550cabec
https://github.com/aimeos/ai-client-htm ... 1d550cabec
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star