简体   繁体   中英

Unable to generate a URL for the named route “clone”

I am following the instructions at https://symfony.com/doc/2.x/bundles/SonataAdminBundle/cookbook/recipe_custom_action.html to build a custom CRUDController in a Symfony/Sonata application.

When I look at the list view, I get the following error message:

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "clone" as such route does not exist.").

Is there additional code needed in order to get the application to recognize my new route?

Ah -- I had to put my configureRoutes() definition in the admin class rather than the controller class. The documentation was wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM