-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuthPublicShareController generates the wrong routes #19475
Comments
Hello, I would say the route needs to match your actual controller implementation either:
(not sure about capital letters when using _ here) or
|
I think you need to use the following: At least that works for the Talk app: |
The Talk app doesn't implement a controller that extends the AuthSecretShare controller. I fixed the issue in my pull request #19478. With the changes everything is working fine. |
But I don't understand how extending another class would break anything. |
ah, now I saw it. the controller is doing mess... |
I've tried to implement an App that has a PublicSharing function without extending the core/routes.php.
Steps to reproduce
Expected behaviour
The controller functions should be accessible via /apps/<app_namespace>/<defined_route>.
Actual behaviour
An Error is logged:
Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route “<my_namespace>.<controller_class_name>.showAuthenticate” as such route does not exist.
https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/AuthPublicShareController.php#L159-L168
The route in the Controller is build with the classname so it has to be defined in the core/routes.php because the syntax there is the whole classname.
The name of my controller is AuthSecretShareController and the namespace of my app is wcoonetimesecret so the route for the URLGenerator is build:
wcoonetimesecret.authsecretsharecontroller.showAuthenticate
the right route would be:
wcoonetimesecret.auth_secret_share.showAuthenticate
Server configuration
Nextcloud version: 18.0.0
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: