(Solved) Symfony\Component\Routing\Exception\InvalidParameterException

Questions around the TYPO3 integration and plugins
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!
Rocco
Posts: 14
Joined: 22 Apr 2016, 04:18

(Solved) Symfony\Component\Routing\Exception\InvalidParameterException

Post by Rocco » 27 Oct 2020, 08:16

Dear Aimeos Team
I have integrated the aimeos shop into my existing website
TYPO3 10.4.9 in composer mode
Aimeos 20.10.1
PHP Version 7.2.24
Operating system: Unix on Mac Os X

The update script has no error and the aimeos dashboard is accessible with the contents.
On the fe output:
I have the (1/1) Symfony\Component\Routing\Exception\InvalidParameterException
Parameter "ai__f_sort" for route "ai_0" must match "[^/]++" ("" given) to generate a corresponding URL.

I am sure that I am missing something at the configuration.
Can someone give me a tip, what could be the reason?

Many thanks in advance and best regards
Last edited by Rocco on 29 Oct 2020, 11:30, edited 1 time in total.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Symfony\Component\Routing\Exception\InvalidParameterException

Post by aimeos » 27 Oct 2020, 09:01

Can you remove the route enhancers from your site configuration?
Seems like one of the rules make problems.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Rocco
Posts: 14
Joined: 22 Apr 2016, 04:18

Re: Symfony\Component\Routing\Exception\InvalidParameterException

Post by Rocco » 27 Oct 2020, 09:56

Many thanks for your reply
I had this as routeEnhancers
routeEnhancers:
Aimeos:
type: Extbase
namespace: ai
defaultController: 'Catalog::list'
routes:
- { routePath: '/pin/{pin_action}/{pin_id}/{d_name}', _controller: 'Catalog::detail' }
- { routePath: '/history/{his_action}/{his_id}', _controller: 'Account::history' }
- { routePath: '/watch/{wat_action}/{wat_id}', _controller: 'Account::watch' }
- { routePath: '/watch/{wat_action}', _controller: 'Account::watch' }
- { routePath: '/fav/{fav_action}/{fav_id}', _controller: 'Account::favorite' }
- { routePath: '/fav/{fav_action}', _controller: 'Account::favorite' }
- { routePath: '/c/{f_name}~{f_catid}', _controller: 'Catalog::list' }
- { routePath: '/l/{f_sort}', _controller: 'Catalog::list' }
- { routePath: '/b/{b_action}', _controller: 'Basket::index' }
- { routePath: '/co/{c_step}', _controller: 'Checkout::index' }
- { routePath: '/p/{d_name}/{d_prodid}/{d_pos}', _controller: 'Catalog::detail' }
- { routePath: '/d/{d_name}/{d_pos}', _controller: 'Catalog::detail' }
defaults:
b_action: ''
c_step: ''
f_sort: ''
d_pos: ''

Without them i have the following error
(1/1) #1530169746 TYPO3\CMS\Core\Resource\Exception\InvalidFileNameException
Empty file name given
in /Users/roccohofer/Sites/kristall10/public/typo3/sysext/frontend/Classes/Resource/FilePathSanitizer.php line 82
public function sanitize(string $originalFileName): string
{
$file = trim($originalFileName);
if (empty($file)) {
throw new InvalidFileNameException('Empty file name given', 1530169746);
}
if (strpos($file, '../') !== false) {
throw new InvalidPathException('File path "' . $file . '" contains illegal string "../"', 1530169814);
}

Rocco
Posts: 14
Joined: 22 Apr 2016, 04:18

Re: Symfony\Component\Routing\Exception\InvalidParameterException

Post by Rocco » 27 Oct 2020, 11:03

It seems to be a problem width the installed SASS compiler for TYPO3 "ws_scss".

Have you a idea, how to solve ist?

Rocco
Posts: 14
Joined: 22 Apr 2016, 04:18

Re: Symfony\Component\Routing\Exception\InvalidParameterException

Post by Rocco » 29 Oct 2020, 11:28

It works now.
The problem was effectively the extension "ws_scss".

I built the Sass compiling into my extension and the shop works as intended.
Many thanks for your support and this wonderful tool.

Post Reply