FriendsOfSymfony/FOSCommentBundle

Can't create thread via DataFixtures

shibby opened this issue · 3 comments

While trying to create thread/comment with Symfony's DataFixtures, RoleThreadAcl throws error.

  [Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException]                                             
  The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.  
Exception trace:
 () at /var/www/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php:57
 Symfony\Component\Security\Core\Authorization\AuthorizationChecker->isGranted() at /var/www/vendor/friendsofsymfony/comment-bundle/FOS/CommentBundle/Acl/RoleThreadAcl.php:102
 FOS\CommentBundle\Acl\RoleThreadAcl->canCreate() at /var/www/vendor/friendsofsymfony/comment-bundle/FOS/CommentBundle/Acl/AclThreadManager.php:125
 FOS\CommentBundle\Acl\AclThreadManager->saveThread() at /var/www/src/Bundle/CoreBundle/DataFixtures/ORM/LoadQuestionData.php:123

So what sould we do about that?

@shibby did you find a way ?

@younessadmi i'm adding comment rows by creating Comment instances directly.

$comment = new Comment(); $comment->setUser($user)...