V
V
Vladimir Krylov2016-03-22 18:54:42
symfony
Vladimir Krylov, 2016-03-22 18:54:42

How to run symfony after cache:clear?

Hello. I decided to clear the cache .
$ php bin/console cache:clear --env=prod
After that, such an error 88c51aac9d6343d9a2ede32f31838276.png
. Here's what it gives after the error.

Unable to find template "@WebProfiler/Profiler/dash.html.twig" in @WebProfiler/Profiler/layout.html.twig at line 1.
500 Internal Server Error - Twig_Error_Loader
2 linked Exceptions: InvalidArgumentException » InvalidArgumentException »

I look at the LOGS:
Marker - 22 Mar 2016 16:53:07
[2016-03-22 16:53:12] request.INFO: Matched route "home_page". {"route_parameters":{"_controller":"AppBundle\\Controller\\MainController::indexAction","_route":"home_page"},"request_uri":"http://127.0.0.1:8000/"} []
[2016-03-22 16:53:12] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} []
[2016-03-22 16:53:12] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17 FROM `user` t0 WHERE t0.id = ? LIMIT 1 [1] []
[2016-03-22 16:53:12] security.DEBUG: User was reloaded from a user provider. {"username":"meowow","provider":"FOS\\UserBundle\\Security\\UserProvider"} []
[2016-03-22 16:53:12] doctrine.DEBUG: SELECT e0_.id AS id_0, e0_.title AS title_1, e0_.description AS description_2, e0_.day AS day_3, e0_.price AS price_4, e0_.image AS image_5 FROM excursion e0_ [] []
[2016-03-22 16:53:12] doctrine.DEBUG: SELECT t0.id AS id_1, t0.title AS title_2, t0.content AS content_3, t0.category_id AS category_id_4 FROM page t0 [] []
[2016-03-22 16:53:12] doctrine.DEBUG: SELECT t0.id AS id_1, t0.title AS title_2, t0.description AS description_3, t0.day AS day_4, t0.price AS price_5, t0.image AS image_6 FROM excursion t0 [] []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Имя","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Имя","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Экскурсия","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Кол-во человек","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Кол-во человек","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"День","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Выберите день","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Отель","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Ваш отель","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Телефон","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Ваш мобильный номер","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] translation.WARNING: Translation not found. {"id":"Записаться","domain":"messages","locale":"en"} []
[2016-03-22 16:53:12] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2016-03-22 16:53:13] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /css/bootstrap.min.css.map"" at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php line 1967 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /css/bootstrap.min.css.map\" at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php:1967, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/appDevUrlMatcher.php:631)"} []
[2016-03-22 16:53:13] request.INFO: Matched route "_wdt". {"route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"ae436e","_route":"_wdt"},"request_uri":"http://127.0.0.1:8000/_wdt/ae436e"} []
[2016-03-22 16:53:13] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} []
[2016-03-22 16:53:13] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17 FROM `user` t0 WHERE t0.id = ? LIMIT 1 [1] []
[2016-03-22 16:53:13] security.DEBUG: User was reloaded from a user provider. {"username":"meowow","provider":"FOS\\UserBundle\\Security\\UserProvider"} []
[2016-03-22 16:53:13] request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to find template "@WebProfiler/Profiler/dash.html.twig" in "@WebProfiler/Profiler/layout.html.twig" at line 1." at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php line 91 {"exception":"[object] (Twig_Error_Loader(code: 0): Unable to find template \"@WebProfiler/Profiler/dash.html.twig\" in \"@WebProfiler/Profiler/layout.html.twig\" at line 1. at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php:91, InvalidArgumentException(code: 0): Unable to find template \"::@WebProfiler/Profiler/dash.html.twig\" : \"The file \"views/@WebProfiler/Profiler/dash.html.twig\" does not exist (in: /Users/vladimirkrylov/Desktop/projects_html/riminiSite/app/Resources).\". at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php:747, InvalidArgumentException(code: 0): The file \"views/@WebProfiler/Profiler/dash.html.twig\" does not exist (in: /Users/vladimirkrylov/Desktop/projects_html/riminiSite/app/Resources). at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php:1611)"} []
[2016-03-22 16:53:14] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2016-03-22 16:53:15] request.INFO: Matched route "_profiler". {"route_parameters":{"_controller":"web_profiler.controller.profiler:panelAction","token":"ae436e","_route":"_profiler"},"request_uri":"http://127.0.0.1:8000/_profiler/ae436e"} []
[2016-03-22 16:53:15] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} []
[2016-03-22 16:53:15] doctrine.DEBUG: SELECT t0.username AS username_1, t0.username_canonical AS username_canonical_2, t0.email AS email_3, t0.email_canonical AS email_canonical_4, t0.enabled AS enabled_5, t0.salt AS salt_6, t0.password AS password_7, t0.last_login AS last_login_8, t0.locked AS locked_9, t0.expired AS expired_10, t0.expires_at AS expires_at_11, t0.confirmation_token AS confirmation_token_12, t0.password_requested_at AS password_requested_at_13, t0.roles AS roles_14, t0.credentials_expired AS credentials_expired_15, t0.credentials_expire_at AS credentials_expire_at_16, t0.id AS id_17 FROM `user` t0 WHERE t0.id = ? LIMIT 1 [1] []
[2016-03-22 16:53:15] security.DEBUG: User was reloaded from a user provider. {"username":"meowow","provider":"FOS\\UserBundle\\Security\\UserProvider"} []
[2016-03-22 16:53:15] request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to find template "@WebProfiler/Profiler/dash.html.twig" in "@WebProfiler/Profiler/layout.html.twig" at line 1." at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php line 91 {"exception":"[object] (Twig_Error_Loader(code: 0): Unable to find template \"@WebProfiler/Profiler/dash.html.twig\" in \"@WebProfiler/Profiler/layout.html.twig\" at line 1. at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php:91, InvalidArgumentException(code: 0): Unable to find template \"::@WebProfiler/Profiler/dash.html.twig\" : \"The file \"views/@WebProfiler/Profiler/dash.html.twig\" does not exist (in: /Users/vladimirkrylov/Desktop/projects_html/riminiSite/app/Resources).\". at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php:747, InvalidArgumentException(code: 0): The file \"views/@WebProfiler/Profiler/dash.html.twig\" does not exist (in: /Users/vladimirkrylov/Desktop/projects_html/riminiSite/app/Resources). at /Users/vladimirkrylov/Desktop/projects_html/riminiSite/var/cache/dev/classes.php:1611)"} []

Please tell me how to solve the problem. Thanks

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Denis, 2016-03-23
@Meowow

And here in general a profile from Symfony and twig?
Read the errors carefully.
"::@WebProfiler/Profiler/dash.html.twig" : "The file " views/@WebProfiler/Profiler/dash.html.twig " does not exist
(in: /Users/vladimirkrylov/Desktop/projects_html/riminiSite/app /Resources ).".
https://github.com/symfony/web-profiler-bundle/tre...
WebProfiler Bundle does not have a file called dash.html.twig at all

V
Vladimir Krylov, 2016-03-22
@Meowow

Tried:
1) in comoser.json require "twig/twig": "@stable" - didn't help
2) composer cache: composer clear-cache - didn't help

M
mistergonza, 2016-03-22
@mistergonza

Well, judging by the error, your profiler cannot find a template for itself.
Try to execute composer install and look in composer.json what you have indicated on the profiler account there.

A
Alexey Skobkin, 2016-03-22
@skobkin

Tell me, please, why are you clearing the cache for the environment prod, and are you showing us the error from the built-in server that runs on server:run? Or are you running this server in the environment prod? So drop this immediately. On the development machine, use the environment devand forget about the key --prod(with rare exceptions).
PS You may have installed dependencies with composer install --no-dev. Again, on the development machine, neither this flag nor --optimize-autoloaderis used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question