[User] prod only : Class does not exist + Bad display of User.groups in admin list

443 views
Skip to first unread message

Lionel Gaillard

unread,
Oct 25, 2012, 12:23:12 PM10/25/12
to sonata...@googlegroups.com
Hi,

It only happend in prod environment. Everything works perfectly in dev. (yes, I cleared both caches)

First problem, I can't add/edit users :

It seems a classname is not provided.

500 Internal Server Error : Class does not exist

Log

[2012-10-25 18:01:16] request.INFO: Matched route "admin_sonata_user_user_create" (parameters: "_controller": "Sonata\AdminBundle\Controller\CRUDController::createAction", "_sonata_admin": "sonata.user.admin.user", "_sonata_name": "admin_sonata_user_user_create", "_route": "admin_sonata_user_user_create") [] []
[2012-10-25 18:01:16] security.DEBUG: Read SecurityContext from the session [] []
[2012-10-25 18:01:16] security.DEBUG: Reloading user from user provider. [] []
[2012-10-25 18:01:16] security.DEBUG: Username "admin" was reloaded from user provider. [] []
[2012-10-25 18:01:16] request.CRITICAL: ReflectionException: Class  does not exist (uncaught exception) at /home/wxr/WWW/westudio/orl/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php line 199 [] []
[2012-10-25 18:01:16] security.DEBUG: Write SecurityContext in the session [] []

Stack

in /project_path/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php at line 199   
at ReflectionClass ->__construct ('') 
in /project_path/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php at line 199   
at AbstractManagerRegistry ->getManagerForClass (null) 
in /project_path/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Registry.php at line 162   
at Registry ->getEntityManagerForClass (null) 
in /project_path/vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php at line 200   
at ModelManager ->getEntityManager (null) 
in /project_path/vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php at line 49   
at ModelManager ->getMetadata (null) 
in /project_path/vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php at line 276   
at ModelManager ->getIdentifierFieldNames (null) 
in /project_path/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Form/ChoiceList/ModelChoiceList.php at line 87   
at ModelChoiceList ->__construct (object(ModelManager), null, null, null, null) 
in /project_path/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Form/Type/ModelType.php at line 82   
at Sonata\AdminBundle\Form\Type\{closure} (object(Options), object(SimpleChoiceList)) 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Options.php at line 466   
at Options ->resolve ('choice_list') 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/Options.php at line 308   
at Options ->all () 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php at line 231   
at OptionsResolver ->resolve (array('sonata_field_description' => object(FieldDescription), 'class' => null, 'model_manager' => object(ModelManager), 'required' => false, 'expanded' => true, 'multiple' => true, 'label' => 'form.label_groups')) 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php at line 115   
at ResolvedFormType ->createBuilder (object(FormFactory), 'groups', array('sonata_field_description' => object(FieldDescription), 'class' => null, 'model_manager' => object(ModelManager), 'required' => false, 'expanded' => true, 'multiple' => true, 'label' => 'form.label_groups'), object(FormBuilder)) 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php at line 87   
at FormFactory ->createNamedBuilder ('groups', 'sonata_type_model', null, array('sonata_field_description' => object(FieldDescription), 'class' => null, 'model_manager' => object(ModelManager), 'required' => false, 'expanded' => true, 'multiple' => true, 'label' => 'form.label_groups'), object(FormBuilder)) 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php at line 128   
at FormBuilder ->create ('groups', 'sonata_type_model', array('sonata_field_description' => object(FieldDescription), 'class' => null, 'model_manager' => object(ModelManager), 'required' => false, 'expanded' => true, 'multiple' => true, 'label' => 'form.label_groups')) 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php at line 274   
at FormBuilder ->resolveChildren () 
in /project_path/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php at line 210   
at FormBuilder ->getForm () 
in /project_path/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Admin/Admin.php at line 788   
at Admin ->buildForm () 
in /project_path/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Admin/Admin.php at line 1235   
at Admin ->getForm () 
in /project_path/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Controller/CRUDController.php at line 446   
at CRUDController ->createAction ()
at call_user_func_array (array(object(CRUDController), 'createAction'), array()) 
in kernel.root_dir/bootstrap.php.cache at line 1426   
at HttpKernel ->handleRaw (object(Request), '1') 
in kernel.root_dir/bootstrap.php.cache at line 1390   
at HttpKernel ->handle (object(Request), '1', true) 
in kernel.root_dir/bootstrap.php.cache at line 1566   
at HttpKernel ->handle (object(Request), '1', true) 
in kernel.root_dir/bootstrap.php.cache at line 617   
at Kernel ->handle (object(Request)) 
in /project_path/web/app.php at line 24

Secondly, I don't know if this problem is relative :

In admin users list, groups column display something like "Doctrine\Common\Collections\ArrayCollection@000000003d8cf91200000000e4d868a7" instead of user's groups.

Lionel Gaillard

unread,
Oct 26, 2012, 4:29:08 AM10/26/12
to sonata...@googlegroups.com
Hmm... it works now.

The only relative difference between environments was SonataEasyExtendBundle.

I tought SonataEasyExtendBundle was only useful in dev. It isn't.
I simply registered SonataEasyExtendBundle for both environments.

Thomas Rabaix

unread,
Oct 26, 2012, 6:40:51 AM10/26/12
to sonata...@googlegroups.com
The sonata easy extends register doctrine mapping, so it cannot be disabled in production.

--
Thomas Rabaix




--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sonata-users/-/vQTolyQKDwcJ.
To post to this group, send email to sonata...@googlegroups.com.
To unsubscribe from this group, send email to sonata-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sonata-users?hl=en.

Reply all
Reply to author
Forward
0 new messages