skip to Main Content

I installed SonataNews Bundle and Extended it as ApplicationSonataNewsBundle.

When I go to /app_dev.php/admin/sonata/news/post/list

I have the issue message

No metadata found for property ApplicationSonataNewsBundleEntityPost::$tags. Please make sure your Doctrine mapping is properly configured.
500 Internal Server Error - MissingPropertyMetadataException

Someone could help me?

Environment

Symfony 2.8

  sonata-project/admin-bundle 3.23.0 The missing Symfony Admin
    Generator sonata-project/block-bundle 3.3.2 Symfony
    SonataBlockBundle sonata-project/cache 1.0.7 Cache library
    sonata-project/cache-bundle 2.3.1 This bundle provides caching
    services sonata-project/classification-bundle 3.3.1 Symfony
    SonataClassificationBundle sonata-project/core-bundle 3.4.0 Symfony
    SonataCoreBundle sonata-project/datagrid-bundle 2.2.1 Symfony
    SonataDatagridBundle sonata-project/doctrine-extensions 1.0.2
    Doctrine2 behavioral extensions
    sonata-project/doctrine-orm-admin-bundle 3.1.6 Symfony Sonata /
    Integrate Doctrine ORM into the SonataAdminBundle
    sonata-project/easy-extends-bundle 2.2.0 Symfony
    SonataEasyExtendsBundle sonata-project/exporter 1.7.1 Lightweight
    Exporter library sonata-project/formatter-bundle 3.2.2 Symfony
    SonataFormatterBundle sonata-project/google-authenticator 1.1.0
    Library to integrate Google Authenticator into a PHP project
    sonata-project/intl-bundle 2.3.1 Symfony SonataIntlBundle
    sonata-project/media-bundle 3.6.0 Symfony SonataMediaBundle
    sonata-project/news-bundle 3.1.2 Symfony SonataNewsBundle
    sonata-project/notification-bundle 3.1.0 Symfony
    SonataNotificationBundle sonata-project/page-bundle 3.5.1 This
    bundle provides a Site and Page management through container and
    block services sonata-project/seo-bundle 2.2.0 Symfony
    SonataSeoBundle sonata-project/translation-bundle 2.1.1
    SonataTranslationBundle sonata-project/user-bundle 3.2.4 Symfony
    SonataUserBundle

Symfony packages

symfony/assetic-bundle v2.8.2 Integrates Assetic into Symfony2
symfony/monolog-bundle v3.1.0 Symfony MonologBundle
symfony/phpunit-bridge v2.8.27 Symfony PHPUnit Bridge
symfony/polyfill-apcu v1.5.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu v1.5.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring v1.5.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php54 v1.5.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55 v1.5.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56 v1.5.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70 v1.5.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util v1.5.0 Symfony utilities for portability of PHP codes
symfony/security-acl v2.8.0 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.3 Symfony SwiftmailerBundle
symfony/symfony v2.8.27 The Symfony PHP framework

PHP version

PHP 7.0.19

2

Answers


  1. I had similar issue, on my case this was due to class configuration. Mapping is injected during Sf DI, but my custom User Class was not found.

    Just check classes used by the News Bundle.

    sonata_news:
        class:
            post:       ApplicationSonataNewsBundleEntityPost
            comment:    ApplicationSonataNewsBundleEntityComment
            media:      ApplicationSonataMediaBundleEntityMedia
            user:       MyCustomUserBundleEntityUser
    
    Login or Signup to reply.
  2. public function toString( $object )
        {
            return $object instanceof Subcateogry
                ? $object->getSubcateogry()
                : 'Subcateogry'; // shown in the breadcrumb on the create view
        }
    

    Please Add this method in your Admin File ‘Subcategory’ is your file name of admin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search