Skip to content
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

[Bug][ShopBundle] Fatal error for 404 pages #8369

Closed
Takeno opened this issue Aug 4, 2017 · 1 comment
Closed

[Bug][ShopBundle] Fatal error for 404 pages #8369

Takeno opened this issue Aug 4, 2017 · 1 comment

Comments

@Takeno
Copy link
Contributor

Takeno commented Aug 4, 2017

Hi guys!

When a resource can't be found, system is going in fatal error:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to FOS\RestBundle\Controller\ExceptionController::__construct() must implement interface FOS\RestBundle\View\ViewHandlerInterface, none given,
called in /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php on line 202 in /app/vendor/friendsofsymfony/rest-bundle/Controller/ExceptionController.php:43 Stack trace: #0 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php(202): FOS\RestBundle\Controller\ExceptionController->__construct() #1 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ContainerControllerResolver.php(74): Symfony\Component\HttpKernel\Controller\ControllerResolver->instantiateController('FOS\RestBundle\...') #2 /app/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php(72): Symfony\Component\HttpKernel\Controller\ContainerControllerResolver->instantiateControl in /app/vendor/friendsofsymfony/rest-bundle/Controller/ExceptionController.php on line 43

It happens with non-existing resources (like /taxons/blablabla) and with not defined routes (like /blablabla).

Examples:

In app_dev.php, NotFoundException is catched by Symfony profiler which show stacktrace. In app env, it goes in error.

@pjedrzejewski
Copy link
Member

This is because of missing config for fos_rest bundle. See the upgrade file.

fos_rest:
    exception: ~

I just fixed it on the demo edition and deployed. :) Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants