将新图像添加到图库时会发生此错误。
过滤器" number_format_decimal"在...中不存在 SonataMediaBundle:MediaAdmin:第54行的edit.html.twig
我的配置 //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
答案 0 :(得分:0)
问题在于奏鸣曲媒体捆绑使用" 2.2.8"不是" dev-master"在你的composer.json上运行php composer.phar update
答案 1 :(得分:0)
我们已修复此问题,有关详细信息,请参阅https://github.com/sonata-project/SonataMediaBundle/commit/352ef71a872fa3f8db1f095569bf68fe0733eafc
答案 2 :(得分:0)
与
合作composer.json
“sonata-project / media-bundle”:“2.2。* @ dev”