Filter "number_format_decimal" does not exist in SonataMediaBundle: MediaAdmin: edit.html.twig on line 54

SonataMediaBundle is working correctly. Since I installed and configured SonataPageBundle, it no longer works. At first I had the answer 500 Internal Server Error (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 link to YouTube, 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 .

Thanks.

+6
source share
1 answer

Add this line to your composer.json

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

then update the composer with this command

  composer update "sonata-project/intl-bundle" 

after that add this line to AppKernel.php

  new Sonata\IntlBundle\SonataIntlBundle(), 

Hope this solves your problem.

+16
source

Source: https://habr.com/ru/post/971396/


All Articles