A
A
Alexander Kubintsev2015-08-13 13:16:08
symfony
Alexander Kubintsev, 2015-08-13 13:16:08

How to eliminate a fatality with an invalid login in the SonataAdminBundle?

Set up SonataAdminBundle + FOS User Bundle.
Everything would be fine, but an annoying fatal error when entering the wrong username / password:

Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException:
"Error: Sonata\UserBundle\Controller\AdminSecurityController::loginAction(): The script tried to execute a method or access a property of an incomplete object.
Please ensure that the class definition "Symfony\Component\Security\Core\Exception\BadCredentialsException" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition " at /var/www/project/vendor/sonata-project/user-bundle/Controller/AdminSecurityController.php line 52 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: Sonata\\UserBundle\\Controller\\AdminSecurityController::loginAction(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Symfony\\Component\\ Security\\Core\\Exception\\BadCredentialsException"of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition at /var/www/project/vendor/sonata-project/user-bundle/Controller/AdminSecurityController .php:52)

Nothing like this came up on google.
There is another problem: when editing a custom role, it is impossible for some reason to cancel the installed role. I save - everything is the same.
Versions: Symfony 2.7, SonataAdmin 2.3, FOS User 1.3.6

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kubintsev, 2015-08-14
@akubintsev

I don't know how I got away. After another composer update, the error disappeared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question