0
votes

This error occurs when I add new image to gallery.

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

my config //app/conf/config.yml

sonata_media:
# if you don't use default namespace configuration
#class:
#    media: MyVendor\MediaBundle\Entity\Media
#    gallery: MyVendor\MediaBundle\Entity\Gallery
#    gallery_has_media: MyVendor\MediaBundle\Entity\GalleryHasMedia
default_context: default
db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr
contexts:
    default:  # the default context is mandatory
        providers:
            - sonata.media.provider.dailymotion
            - sonata.media.provider.youtube
            - sonata.media.provider.image
            - sonata.media.provider.file

        formats:
            small: { width: 100 , quality: 70}
            big:   { width: 500 , quality: 70}

cdn:
    server:
        path: /uploads/media # http://media.sonata-project.org/

filesystem:
    local:
        directory:  %kernel.root_dir%/../web/uploads/media
        create:     false
3

3 Answers

0
votes

The problem is on the sonata media bundle use "2.2.8" not "dev-master" on your composer.json and run php composer.phar update

0
votes

Working well with

composer.json

"sonata-project/media-bundle": "2.2.*@dev"