Exception The "args" parameter is missing

I try to upgrade a Kirby 2 site to Kirby 3. I finished most of the upgrade steps ond most of the pages are working. But there is one page, when I try it to open I get an Exception and I have no clue whats the cause.

The Exception says »The “args” parameter is missing« and is triggered in kirby\src\Toolkit\Controller.php in line 32.

I have tried to empty the templatefile of that page, but that doesnt changed anything.

What stepts could I try to get rid of that exception?

In Kirby 2 you could fetch additional arguments from a route in the controller using the $args parameter. Could you please post what you have in your controller?

Thank you, it was in the controller. I just had to remove the args parameter of the function call.

If you have to pass data from a route to a controller, you can now do it like this: https://getkirby.com/docs/guide/routing#pass-data-to-controller

i am upgrading from 2.5 and took a first step by going to 3.0. my problem is that i have an OPTIONAL-parameter that i would like to pass to the controller:

aic.cologne/initiatives/spaces => show all spaces
aic.cologne/initiatives/spaces/S => show all spaces beginning with S

when i call the controller with my custom route (/initiatives/spaces/(:any)) it’s working

page('initiatives/spaces')->render($data)

however the default routing (/initiatives/spaces) throws an error in the controller because it is missing the param. is there a way to make the param optional or do i have to adress this by handling the default routing in my custom-routes?

What is in your controller?