0

当我将新图像添加到图库时会发生此错误。

SonataMediaBundle:MediaAdmin:edit.html.twig 第 54 行中不存在过滤器“number_format_decimal”

我的配置 //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
4

3 回答 3

0

问题出在奏鸣曲媒体包上,在您的 composer.json 上使用“2.2.8”而不是“dev-master”并运行 php composer.phar update

于 2014-04-23T09:56:37.050 回答
0

我们解决了这个问题,有关更多信息,请参阅https://github.com/sonata-project/SonataMediaBundle/commit/352ef71a872fa3f8db1f095569bf68fe0733eafc

于 2014-05-02T14:12:26.290 回答
0

作曲家.json

“奏鸣曲项目/媒体包”:“2.2.*@dev”

于 2014-07-29T13:53:19.720 回答