1
votes

Symfony2 returns No route found for "GET /Categoria/" when I try to access to localhost/Symfony/web/app_dev.php/Categoria/, the page localhost/Symfony/web/app_dev.php/hello/Guido works.

src\grupo85\entregaFinalBundle\Resources\config\routing.yml:

grupo85entrega_final_homepage:
pattern:  /hello/{name}
defaults: { _controller: grupo85entregaFinalBundle:Default:index }

app\config\routing.yml:

grupo85entrega_final:
  resource: "@grupo85entregaFinalBundle/Resources/config/routing.yml"
  prefix:   /

grupo85entregaFinalBundle:
  resource: "@grupo85entregaFinalBundle/Controller/"
  type: annotation
  prefix: /

php app/console route:debug

categoria                     GET    ANY    ANY  /categoria/
categoria_create              POST   ANY    ANY  /categoria/
categoria_new                 GET    ANY    ANY  /categoria/new
categoria_show                GET    ANY    ANY  /categoria/{id}
categoria_edit                GET    ANY    ANY  /categoria/{id}/edit
categoria_update              PUT    ANY    ANY  /categoria/{id}
categoria_delete              DELETE ANY    ANY  /categoria/{id}

I've also tried to run the cache:clear --env prod command and remove pp/cache folder manually. What's wrong? Thanks.

1

1 Answers

2
votes

Please understand error message. You have not route for /Categoria/. You have route for /categoria/. Please notice lower case. SF2 router recognizes lower and upper cases.