1

I have a Symfony-demo repository on git which I am experimenting with. It was all running fine on localhost until I tried pushing this to github (see my earlier question here if relevant).

I understand that Symfony bundles are in .gitignore and not included in the remote repository, however I can't figure out why my local repository would no longer be working - I still see all the local directories such as /vendor/ for example so would have thought nothing locally would have changed.

However, it must have changed something as the symfony demo site no longer works on localhost once I try logging in to the backend I get:

CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value NULL behavior is not implemented. Only the locale "en" is supported. Please install the "intl" extension for full localization capabilities.") in "admin/blog/index.html.twig" at line 22." at /ProjectsI/symfony_demo/app/cache/dev/classes.php line 4697

I have tried php app/console doctrine:fixtures:load as well as restarting the apache server but no luck there either.

Update:

I added the below line as suggested however, I still get the below errors:

parameters:
    # This parameter defines the codes of the locales (languages) enabled in the application
    app_locales: en|fr|de|es|cs|ru|uk|ro|pt_BR
    locale: en
  1. DEBUG - SELECT t0.id AS id1, t0.title AS title2, t0.slug AS slug3, t0.summary AS summary4, t0.content AS content5, t0.authorEmail AS authorEmail6, t0.publishedAt AS publishedAt7 FROM Post t0

  2. CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method's argument $locale value NULL behavior is not implemented. Only the locale "en" is supported. Please install the "intl" extension for full localization capabilities.") in "admin/blog/index.html.twig" at line 22." at /Projects/symfony_demo/app/cache/dev/classes.php line 4697

Community
  • 1
  • 1
Bendy
  • 3,506
  • 6
  • 40
  • 71
  • Are there any git-hooks ? What does `git status` says ? is there a command you don't recognize acting in `git reflog` ? – topheman Aug 04 '15 at 20:44
  • I recall this having something to do with php.ini timezone settings? – mr12086 Aug 04 '15 at 23:31
  • It seems that it's an issue in Symfony and is currently in the middle of being resolved: https://github.com/symfony/symfony/issues/15507 – Bendy Sep 13 '15 at 14:37

2 Answers2

1

Your error seems to be linked to the cache, try clearing it: php app/console cache:clear

It seems you locale is set to Null, try setting a parameter in your app/config.yml saying:

parameters:
    locale: en
  • Thanks - I tried clearing the cache and adding the `parameters:` code you suggested however it still does not work. I will update my question with the error in the log (I'm confused as to how/why this would have changed when I have not changed any code at all from the symfony-demo other than pushing it to github(!) – Bendy Aug 07 '15 at 18:40
  • Have you tried getting php_intl extension? Verify its installed with `phpinfo()`. If not you might want to try that, installation should be easy, most of the time you just need to uncomment a line in php.ini, it will depend on you installation though. – Alexander Micklewright Aug 10 '15 at 11:40
0

The comment I made about the bug being fixed - seems that will just be an update to deal with it. However, to fix the problem at source I found that I needed to install the php5-intl extension:

Ubuntu: sudo apt-get install php5-intl

Fedora/Cent OS: sudo yum install php-intl

...and then restart the apache2 server: sudo service apache2 restart

Bendy
  • 3,506
  • 6
  • 40
  • 71