奏鸣曲电子商务 - 无法在空变量上调用方法 ( "hasroute" )



我是sonata项目的粉丝,但设置电子商务模块是非常疯狂的

我创建了新的产品提供商,我遵循所有这些步骤https://sonata-project.org/bundles/ecommerce/master/doc/reference/tutorials/create-product.html#configuration-后台

产品提供商可以

但当我点击它时"无法对null变量调用方法("hasroute"(。

TwigErrorRuntimeError:
Impossible to invoke a method ("hasroute") on a null variable.
at vendor/sonata-project/admin-bundle/src/Resources/views/Form/form_admin_fields.html.twig:613
at twig_get_attribute(object(Environment), object(Source), null, 'hasroute', array('list'), 'method', false, false, false, 613)
(var/cache/dev/twig/1a/1a9bdba03ad1424df284f8c527d3514c85448a804e11ed9ad4d5ad856f76a77a.php:2037)
at __TwigTemplate_257b0cad492d880883cd5a7582c74613fa66ee34ccb1a1c2088d411013c1176f->block_sonata_type_model_list_widget(array('value' => null, 'attr' => array('class' => ''), 'form' => object(FormView), 'id' => 's60956d878485a_image', 'name' => 'image', 'full_name' => 's60956d878485a[image]', 'disabled' => false, 'label' => 'form.label_image', 'label_format' => null, 'multipart' => false, 'block_prefixes' => array('form', 'text', 'sonata_type_model_list', '_s60956d878485a_image', 'sonata_product_admin_product_sonata_type_model_list', 'sonata_product_admin_product_image_sonata_type_model_list', 'sonata_product_admin_product_image_sonata_type_model_list_image'), 'unique_block_prefix' => '_s60956d878485a_image', 'row_attr' => array(), 'translation_domain' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'cache_key' => '_s60956d878485a_image_sonata_type_model_list', 'errors' => 

索纳塔配置

$ /d/wamp64/bin/php/php7.3.5/php.exe bin/composer.phar info sonata*
sonata-project/admin-bundle              3.98.2 The missing Symfony Admin Generator
sonata-project/block-bundle              3.23.1 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  Cache library
sonata-project/classification-bundle     3.16.0 Symfony SonataClassificationBundle
sonata-project/comment-bundle            3.3.1  Integrate the FOSCommentBundle in the Sonata Project
sonata-project/core-bundle               3.20.0 Symfony SonataCoreBundle (abandoned)
sonata-project/datagrid-bundle           3.3.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.12.0 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.34.0 Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/ecommerce                 3.5.2  E-Commerce solution provided by Sonata
sonata-project/entity-audit-bundle       1.3.1  Audit for Doctrine Entities
sonata-project/exporter                  2.6.2  Lightweight Exporter library
sonata-project/form-extensions           0.1.2  Symfony form extensions
sonata-project/formatter-bundle          4.5.0  Symfony SonataFormatterBundle
sonata-project/intl-bundle               2.10.1 Symfony SonataIntlBundle
sonata-project/media-bundle              3.31.1 Symfony SonataMediaBundle
sonata-project/media-orm-pack            1.0.0  A pack for SonataMediaBundle with ORM support
sonata-project/notification-bundle       3.12.0 Symfony SonataNotificationBundle
sonata-project/seo-bundle                2.13.0 Symfony SonataSeoBundle
sonata-project/timeline-bundle           3.7.0  Integrates SpyTimelineBundle into Sonata
sonata-project/twig-extensions           0.1.1  Sonata twig extensions
sonata-project/user-bundle               4.11.1 Symfony SonataUserBundle

请帮助

我遇到了同样的问题
您需要为父管理中的相关子实体创建一个管理。

你能粘贴实体、管理和service.yaml文件吗?

相关内容

  • 没有找到相关文章

最新更新