gpt4 book ai didi

symfony - 无法在 SonataAdminBundle::standard_layout.html.twig 中找到模板 "SonataCoreBundle:FlashMessage:render.html.twig"

转载 作者:行者123 更新时间:2023-12-02 06:35:20 25 4
gpt4 key购买 nike

我在 Sonata admin 中请求 URL 时收到此错误消息:

Unable to find template "SonataCoreBundle:FlashMessage:render.html.twig" in SonataAdminBundle::standard_layout.html.twig at line 188.

我已经重新安装了我所有的供应商,但错误是一样的..

这是我的 composer.json 和我的 config.yml:

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"ziiweb/frontendbundle": "@dev",
"friendsofsymfony/user-bundle": "~2.0@dev",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/media-bundle": "dev-master"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}


imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: @ProjectUserBundle/Resources/config/admin.yml }
- { resource: @ProjectAdminBundle/Resources/config/admin.yml }

framework:
#esi: ~
#translator: { fallback: %locale% }
secret: %secret%
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_proxies: ~
session: ~
fragments: ~
http_method_override: true

# Twig Configuration
twig:
debug: %kernel.debug%
strict_variables: %kernel.debug%

# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
bundles: [ ProjectFrontendBundle ]
#java: /usr/bin/java
filters:
cssrewrite: ~
sass: ~
compass: ~
#closure:
# jar: %kernel.root_dir%/Resources/java/compiler.jar
#yui_css:
# jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar

parameters:
assetic.filter.compass.images_dir: %kernel.root_dir%/../web/bundles/projectfrontend/images
assetic.filter.compass.http_path: /bundles/projectfrontend
assetic.filter.compass.generated_images_path: %kernel.root_dir%/../web/bundles/projectfrontend/images

# Doctrine Configuration
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8
types:
#json: Sonata\Doctrine\Types\JsonType

# if using pdo_sqlite as your database driver, add the path in parameters.yml
# e.g. database_path: %kernel.root_dir%/data/data.db3
# path: %database_path%

orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
#entity_managers:
#default:
#mappings:
#SonataMediaBundle: ~

# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
spool: { type: memory }


fos_user:
db_driver: orm
firewall_name: main
user_class: Project\Bundle\UserBundle\Entity\User

knp_menu:
twig: # use "twig: false" to disable the Twig extension and the TwigRenderer
template: knp_menu.html.twig
templating: false # if true, enables the helper for PHP templates
default_renderer: twig # The renderer to use, list is also available by default

sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]

sonata.block.service.text:
sonata.block.service.rss:


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
providers:
image:
resizer: sonata.media.resizer.custom # THIS IS OUR NEW RESIZER SERVICE
#create: false

#doctrine_phpcr:
#odm:
#auto_mapping: true
#mappings:
#SonataMediaBundle:
#prefix: Sonata\MediaBundle\PHPCR

最佳答案

您必须将 sonata-core 包添加到您的 composer.json 中:

"sonata-project/core-bundle": "dev-master"

并重新安装供应商。应该有帮助。

关于symfony - 无法在 SonataAdminBundle::standard_layout.html.twig 中找到模板 "SonataCoreBundle:FlashMessage:render.html.twig",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20784184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com