I have installed News Bundle.
I have configured it following the steps indicated in the Official documentation.
sonata_news:
title: Sonata Project
link: https://sonata-project.org
description: Cool bundles on top of Symfony2
salt: 'secureToken'
permalink_generator: sonata.news.permalink.date # sonata.news.permalink.collection
permalink:
date: '%%1$04d/%%2$02d/%%3$02d/%%4$s' # => 2012/02/01/slug
db_driver: 'doctrine_orm' # doctrine_orm or doctrine_mongodb it is mandatory to choose one here
class:
post: App\Application\Sonata\NewsBundle\Entity\Post
comment: App\Application\Sonata\NewsBundle\Entity\Comment
media: App\Application\Sonata\MediaBundle\Entity\Media
tag: App\Application\Sonata\ClassificationBundle\Entity\Tag
collection: App\Application\Sonata\ClassificationBundle\Entity\Collection
user: App\Entity\BaseUser
admin:
post:
class: Sonata\NewsBundle\Admin\PostAdmin
controller: SonataAdminBundle:CRUD
translation: SonataNewsBundle
comment:
class: Sonata\NewsBundle\Admin\CommentAdmin
controller: SonataNewsBundle:CommentAdmin
translation: SonataNewsBundle
comment:
notification:
emails: [email@example.org, email2@example.org]
from: no-reply@sonata-project.org
template: '@SonataNews/Mail/comment_notification.txt.twig'
I would like to associate the author field of the NewsBundle entity Post with the User entity that I created, but that does not work I have the impression that it does not make the association.
Steps to reproduce
Expected results
Should see the Product add/update form but it does not work.
Actual results
Impossible to invoke a method ("id") on a null variable.
{% if sonata_admin.field_description.associationadmin.id(sonata_admin.value) %}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Environment
Sonata packages
Symfony 4.4.5 - Custom User Entity
Symfony packages
PHP version
Subject
I have installed News Bundle. I have configured it following the steps indicated in the Official documentation.
I would like to associate the author field of the NewsBundle entity Post with the User entity that I created, but that does not work I have the impression that it does not make the association.
Steps to reproduce
Expected results
Should see the Product add/update form but it does not work.
Actual results