Sonataadminbundle: Could not convert database value "" to Doctrine Type array

Created on 2 Mar 2015  路  2Comments  路  Source: sonata-project/SonataAdminBundle

This error occurs when I try to access /admin/mybundle/mybundle/entity/list and on three of five entities.

Further information:

  • One entity is a FOSBundle:User, the other two are related to this user.
  • I have one entity that is also related to the User where this error does not occur.

I haven't changed anything on the Entity Model (was just working on Services and Controllers) since the last time I remember admin to be working.

Any ideas?

Most helpful comment

Seems as related to FOSUserBundle - trying to unserialize empty string.

I have found a few resources, that may help you:

http://blog.webdevilopers.net/fosuserbundle-login-error-could-not-convert-database-value-to-doctrine-type-array/
https://github.com/FriendsOfSymfony/FOSUserBundle/issues/557

All 2 comments

Seems as related to FOSUserBundle - trying to unserialize empty string.

I have found a few resources, that may help you:

http://blog.webdevilopers.net/fosuserbundle-login-error-could-not-convert-database-value-to-doctrine-type-array/
https://github.com/FriendsOfSymfony/FOSUserBundle/issues/557

Same as in the linked issues: One roles attribute was an empty string (instead of an empty DC2Type array: a:0:{}). Thanks for pointing me there.

Closed.

Was this page helpful?
0 / 5 - 0 ratings