I am having problems when I use my Symfony2 project in prod environment. I am getting this log... anyone could help me? In dev environment, everything is ok...
[2014-06-29 20:12:24] request.CRITICAL: Uncaught PHP Exception
Twig_Error_Syntax: "An exception has been thrown during the
compilation of a template ("There is no "yui_js" filter.") in
"AvocodeFormExtensionsBundle::javascripts.html.twig"." at
C:\xampp\htdocs\UniDocs\vendor\twig\twig\lib\Twig\Environment.php line
564 {"exception":"[object] (Twig_Error_Syntax: An exception has been
thrown during the compilation of a template (\"There is no \"yui_js\"
filter.\") in \"AvocodeFormExtensionsBundle::javascripts.html.twig\".
at
C:\xampp\htdocs\UniDocs\vendor\twig\twig\lib\Twig\Environment.php:564,
InvalidArgumentException: There is no \"yui_js\" filter. at
C:\xampp\htdocs\UniDocs\vendor\kriswallsmith\assetic\src\Assetic\FilterManager.php:35)"}
[]
Related
I am having some trouble to test akeneo (PIM based on symfony) features, as some parts of akeneo backend return the following error:
Sorry, page was not loaded correctly
It specifically occurs if I click under enrich, or settings.
I checked under app/logs, here is what I found:
[2016-11-05 13:57:36] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("There are no activated locales") in "/var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/views/Attribute/index.html.twig" at line 68." at /var/www/html/pim-community-standard/app/cache/prod/classes.php line 5700 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"There are no activated locales\") in \"/var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/views/Attribute/index.html.twig\" at line 68. at /var/www/html/pim-community-standard/app/cache/prod/classes.php:5700, LogicException(code: 0): There are no activated locales at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php:110)"} []
I searched almost everything I could find in forums, but I'm still stuck with this issue.
Another error is also logged (depending on where I click):
[2016-11-05 13:58:55] request.CRITICAL: Uncaught PHP Exception LogicException: "There are no activated locales" at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php line 110 {"exception":"[object] (LogicException(code: 0): There are no activated locales at /var/www/html/pim-community-standard/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Context/UserContext.php:110)"} []
These are the two errors that I was able to find in logs.
I double checked the install & all requirements (ubuntu 1.14). Everything seems fine.
Would you have an idea?
Thanks in advance!
Try to go "My Account - Additional" and select 2 locales, English and Spanish for example. Then go to console and delete the folder
pim-community-standard/app/cache/
When starting again Akeneo, view all akeneo_pim logs, or make a
tail -f /logs*
in the logsfolder.
I just installed a copy of Sylius on my dev server (Ubuntu), configured the database parameters, resolved all dependencies, and ran sylius:install. Install completed successfully, and all looked good.
When trying to access the front-end (web/app_dev.php), however, I get an error thrown during template rendering:
Uncaught PHP Exception Twig_Error_Runtime: "An exception has been
thrown during the rendering of a template ("Channel could not be
found!") in "SyliusWebBundle:Frontend:layout.html.twig" at line 55."
at
/var/www/mysite.com/public_html/vendor/twig/twig/lib/Twig/Template.php
line 182 Context: { "exception": "Object(Twig_Error_Runtime)" }
I'm not entirely sure what channel it's unable to find, or how to resolve this.
In prod env when error occurured symfony displays a standard error page.
This is the standard default framework error page:
But when PDO can't connect to database symfony display this error to the client:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known' in /homepages/35/d619429344/htdocs/mcg/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /homepages/35/d619429344/htdocs/mcg/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=db63...', 'dbo632759072', 'mgm_mgm', Array) #1 ...
PDO exeptions:
I can't display this error to the client for security reason.
Any ideas on how to disable these messages and redirect to an error page like other error ?
You should have display_errors = off in your PHP.ini anyway to avoid this problem. Errors that reveal details like these come from many places, in addition to PDO.
When transfering to production server I've got this error.
[2016-04-27 18:45:23] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2016-04-27 18:45:24] request.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unknown "knp_menu_render" function in "dailyShop/index.html.twig" at line 210." at /home/ashkov/www/ruproms.ru/vendor/twig/twig/lib/Twig/ExpressionParser.php line 573 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unknown \"knp_menu_render\" function in \"dailyShop/index.html.twig\" at line 210. at /home/ashkov/www/ruproms.ru/vendor/twig/twig/lib/Twig/ExpressionParser.php:573)"} []
In the development enviroment everything is ok.
composer update was made several times.
new Knp\Bundle\MenuBundle\KnpMenuBundle(), on its place in app/AppKernel.php
This solved the problem:
php bin/console cache:clear -e prod
i deployed my symfony application on my server and it works fine in dev mode but in prod mode i have this error :
Fatal error: Uncaught exception 'ReflectionException' with message
'Class
Sharincook\MessagerieBundle\Entity\Sharincook\MessagerieBundle\Entity\Message
does not exist
and if i try to clean cache with putty i have this error :
syntax error, unexpected T_STRING, expecting
T_CONSTANT_ENCAPSED_STRING or '(' in ....app/console
so i don't have any ideas
thanks