Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The filter "number_format_decimal" does not exist in SonataMediaBundle:MediaAdmin:edit.html.twig at line 54

SonataMediaBundle used to work correctly. Since I installed and configured SonataPageBundle it doesn't work anymore .. At first, I had a 500 Internal Server Error as a response (I created the default site, the default pages and the default snapshots) and the rest of the pages worked fine ! then I installed and configured SonataFormatterBundle and then I don't know why when I try to upload a file or a youtube link I got this error :

The filter "number_format_decimal" does not exist in SonataMediaBundle:MediaAdmin:edit.html.twig at line 54
500 Internal Server Error - Twig_Error_Syntax

I also have SonataIntlBundle activated in my AppKernel.php.

Thank you.

like image 217
Nizar Boussarsar Avatar asked Jun 26 '14 23:06

Nizar Boussarsar


1 Answers

Add this line to your composer.json

    "sonata-project/intl-bundle": "2.2.x-dev",

then update composer by this command

    composer update "sonata-project/intl-bundle"

after that add this line to AppKernel.php

    new Sonata\IntlBundle\SonataIntlBundle(),

Hope this will solve your problem.

like image 110
Azam Alvi Avatar answered Oct 09 '22 12:10

Azam Alvi