I created the package using the php app/console generate:bundle command to add the package to /app/AppKernel.php as well as to /app/config/routing.yml . If I try to access the URL http://devserver/web/app_dev.php/bank_homepage , I get 404 error. I check /app/logs/prod.log and see the following:
[2013-07-29 13:41:27] request.ERROR: Unused PHP exception Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException: "No route found for" GET / web / app_dev.php / bank_homepage "on / var / www /html/app/cache/prod/classes.php line 1880 {"Exception": "[object] (Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException: No route found for \" GET / web / app.php / bank_homepage \ "in /var/www/html/app/cache/prod/classes.php:1880, Symfony \ Component \ Routing \ Exception \ ResourceNotFoundException: at /var/www/html/app/cache/prod/appProdUrlMatcher.php: 1222) "} []
What am I doing wrong?
This is my /app/config/routing.yml
bank: resource: "@BankBundle/Resources/config/routing.yml" prefix: / ....
And this is my /src/BankBundle/Resources/config/routing.yml
bank_homepage: pattern: /hello/{name} defaults: { _controller: BankBundle:Default:index } requirements: _method: GET
EDIT some tests I change the URL from http://devserver/web/app_dev.php/bank_homepage to http://devserver/web/app_dev.php and then the error changes to this:
[2013-07-29 14:22:15] request.ERROR: Unaccepted PHP exception Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException: "No route found for" GET / web / app_dev.php ", in / var / www /html/app/cache/prod/classes.php line 1880 {"Exception": "[object] (Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException: No route found for \" GET / web / app_dev.php \ " at /var/www/html/app/cache/prod/classes.php:1880, Symfony \ Component \ Routing \ Exception \ ResourceNotFoundException: at /var/www/html/app/cache/prod/appProdUrlMatcher.php:1222) "} []
What is almost the same
PS: I check (this) [No route found for "GET / portfolio", but this did not work for me
source share