Akeneo - Cannot access specific parts of the backend (http 500) - symfony

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.

Related

How to fix 'Uncaught PHP Exception Twig_Error_Loader: Unable to find template' on Symfony 3.4?

I deployed a symfony 3.4 project from my local machine (Windows 10) to a cloud server (Digital Ocean) based on Ubuntu.
I spent 2 days trying to resolve this (i think) routing problem:
"request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader..."
Locally, on localhost with XAMPP, it works perfect.
The project runs ok on the login (is like a backend user app), with the register ok But when it tries to pass the login, it needs to load the initial dashboard with some includes (like nav_side.html.twig) and the server response is error 500.
How can i fix it?
Thanks a lot for your response...i'm a little bit desperate. :)
I made composer update, i deleted the cache folder, but the error is still there.
request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to
find template "Backe ndBundle:includes:nav_side.html.twig"
(looked into: /var/www/onecup/app/Resources/views,
/var/www/onecup/vendor/s
ymfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in
"BackendBundle:Dashboard:index.html.twig" at line 7." at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line
234 {"exception":"[object] (Twig_Err or_Loader(code: 0):
Unable to find template \"BackendBundle:includes:nav_side.html.twig\"
(looked into: /var/www/ onecup/app/Resources/views,
/var/www/onecup/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form)
in \"BackendBundle:Dashboard:index.html.twig\" at line 7. at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Fil
esystem.php:234)"} []
#Flying was right: examine your code and try to find possible case inconsistences in directory / filenames. e.g. "file" and "File". Windows filesystem is case-insensitive, but Ubuntu filesystem is case-sensitive.
So, i changed the Includes to includes and that's all.
Thanks a lot!! :)

JMS Call to a member function has() on null

Bundle version 1.3.1
| Symfony version 3.3
| PHP version 7.1.9
Expected behavior
After installing the different bundles (JMSTranslationBundle, JMSDIExtraBundle, checking if i had sensio/framework-extra-bundle), and after i made the right configuration in config.yml and routing_dev.yml, the right behavior should be that the /_trans lead me to a translation interface (working), and change nothing else.
Actual behavior
Getting on a route different from /_trans return Call to a member function has() on null with error 500. Therefore, the whole site is dead, except the translation UI.
Steps to reproduce
Install JMSTranslationBundle, then when asked, install JMSDIExtraBundle to get the web ui
After that, test the /_trans. This should work. But when you get to your others routes, they return 500 error
I have exactly the same issue (Sf 3.3.9/PHP 7.1.9). I have to remove the line related to "JMSDiExtraBundle" in AppKernel to make my app works again. This is the only workaround I found, not very efficient.
Very low trace log information, this is what I have:
Stack Trace:
Logs:
CRITICAL 19:56:59 php Call to a member function has() on null
CRITICAL 19:56:59 request Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function has() on null" at /Users/stephanfo/PhpstormProjects/openbuy/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php line 233
Exception:
Any help would be helpful.
Thanks,
Stef.

Sylius template rendering exception - channel not found

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.

symfony 2.8 debug fatal error double message

Environment: Symfony 2.8.1 with XAMPP Version 5.5.24 on Windows 7.
If I trigger a fatal error in a controller, anything as simple as $array = ; in production environment, I'm getting a default php error:
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\tgsupport-test\src\AppBundle\Controller\DefaultController.php on line 16
followed by symfony custom error page message. Obviously I'd want to avoid to show eorr info in production.
Moreover in prod.log I see a double critical error: under php.CRITICAL and request.CRITICAL. Is really useful to show the same error twice?
I'm using default configuration, indeed I just installed default framework without any custom setting and I triggered my error in AppBundle/DefaultController, so I was wondering if I'm missing anything.
I missed a php.ini configuration to avoid to display error messages in page.

Fatal error when copying wordpress site from server to localhost

I've been trying to create a local copy of this wordpress site - click4taps.co.uk. But even though everything seems to run pretty much fine on the server, on localhost I am getting these code errors, I would have maybe expected a database error if I had forgot something in the setup. I'm not super good at php but I can't see anything that out of place in the code the error specifies.
Here is the error message I receive when trying to launch the site in localhost:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_layered_nav_init' not found or invalid function name in C:\Program Files (x86)\Ampps\www\click4taps\wp-includes\plugin.php on line 406
Fatal error: Call to undefined function is_product() in C:\Program Files (x86)\Ampps\www\click4taps\wp-content\themes\bazar\theme\plugins\woocommerce-ajax-layered-nav\init.php on line 59
Any feedback on this would be very helpful thanks
Activate your woocommerce plugin

Resources