Receiving the following error message when trying to run my project.
Fatal error: Uncaught exception 'Doctrine\ODM\PHPCR\Translation\MissingTranslationException' with message 'The locale 'en' is not present in the list of available locales' in /var/www/sources/piccolo-standard/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php on line 133
Doctrine\ODM\PHPCR\Translation\MissingTranslationException: The locale 'en' is not present in the list of available locales in /var/www/sources/piccolo-standard/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php on line 133
And the following stack trace:
# Time Memory Function Location
1 0.0040 240752 {main}( ) ../app.php:0
2 0.0299 643576 Symfony\Component\HttpKernel\HttpCache\HttpCache->handle( ) ../app.php:20
3 0.0309 657488 Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup( ) ../HttpCache.php:193
4 0.0316 659008 Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch( ) ../HttpCache.php:329
5 0.0317 665184 Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward( ) ../HttpCache.php:429
6 0.4876 9740256 Symfony\Component\HttpKernel\HttpCache\HttpCache->forward( ) ../HttpCache.php:60
7 0.4877 9742120 Symfony\Component\HttpKernel\Kernel->handle( ) ../HttpCache.php:466
8 0.4957 9838264 Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle( ) ../Kernel.php:187
That is all what I am getting as error report. What could be going wrong?
edit: Here is a part my config.yml;
framework:
#esi: ~
translator: { fallback: en }
secret: %secret%
router: { resource: "%kernel.root_dir%/config/routing.yml" }
form: true
csrf_protection: true
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
default_locale: %locale%
session: ~
edit 2: After configuring config.yml;
Warning: filemtime(): stat failed for /var/www/sources/piccolo-standard/app/config/config.yml in /var/www/sources/piccolo-standard/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/FileResource.php on line 68
Fatal error: Uncaught exception 'Doctrine\ODM\PHPCR\Translation\MissingTranslationException' with message 'The locale 'en' is not present in the list of available locales' in /var/www/sources/piccolo-standard/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php on line 133
Doctrine\ODM\PHPCR\Translation\MissingTranslationException: The locale 'en' is not present in the list of available locales in /var/www/sources/piccolo-standard/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Translation/LocaleChooser/LocaleChooser.php on line 133
Edit 3: Solution The problem was a combining of two issues. The first one was the config.yml. Make sure that the 'doctrine_phpcr.odm.locales' section is set as followed (or something a like, considering what languages you support):
locales:
en: [de, fr]
de: [en, fr]
fr: [en, de]
And the second problem was the absence of database connection configured in 'parameters.yml'. Without connection to my database, the server most likely tried to load an English object (perhaps a DateTime) and failed to load.