FOSUserBundle does not have a method 'getGetsession'

Discuss Symfony 2 bundles here

Moderators: dcobalt, tiagojsag

FOSUserBundle does not have a method 'getGetsession'

Postby Mitchel » Wed May 30, 2012 11:08 am

Hi there,

I was following the steps in de FosUserDundle documentation:
https://github.com/FriendsOfSymfony/FOS ... c/index.md

and watched the video tutorial:
http://www.youtube.com/watch?v=ZvLUvOaW_XY

But still <b>something</b> goes wrong.

If i visit the /login I get the next error:
Code: Select all
Whoops, looks like something went wrong.
2/2 Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables' does not have a method 'getGetsession' in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8363") in "FOSUserBundle::layout.html.twig".

    in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8222
    at Twig_Template->displayWithErrorHandling() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8196
    at Twig_Template->display() in /Users/mitchel/Projecten/Symfony/app/cache/dev/twig/aa/d2/c7ad5fa6ef6f8642f38cd02a058e.php line 24
    at __TwigTemplate_aad2c7ad5fa6ef6f8642f38cd02a058e->doDisplay() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8218
    at Twig_Template->displayWithErrorHandling() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8196
    at Twig_Template->display() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8206
    at Twig_Template->render() in /Users/mitchel/Projecten/Symfony/vendor/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php line 59
    at TwigEngine->render() in /Users/mitchel/Projecten/Symfony/vendor/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php line 113
    at TwigEngine->renderResponse() in /Users/mitchel/Projecten/Symfony/src/FOS/UserBundle/Controller/SecurityController.php line 49
    at SecurityController->loginAction()
    at call_user_func_array() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 3905
    at HttpKernel->handleRaw() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 3875
    at HttpKernel->handle() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 4879
    at HttpKernel->handle() in /Users/mitchel/Projecten/Symfony/app/bootstrap.php.cache line 552
    at Kernel->handle() in /Users/mitchel/Projecten/Symfony/web/app_dev.php line 27

1/2 ErrorException: Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables' does not have a method 'getGetsession' in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8363

    in /Users/mitchel/Projecten/Symfony/vendor/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php line 67
    at ErrorHandler->handle()
    at call_user_func_array() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8363
    at Twig_Template->getAttribute() in /Users/mitchel/Projecten/Symfony/app/cache/dev/twig/d5/08/4a407fe201d22e3a86f65c0cc39d.php line 59
    at __TwigTemplate_d5084a407fe201d22e3a86f65c0cc39d->doDisplay() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8218
    at Twig_Template->displayWithErrorHandling() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8196
    at Twig_Template->display() in /Users/mitchel/Projecten/Symfony/app/cache/dev/twig/aa/d2/c7ad5fa6ef6f8642f38cd02a058e.php line 24
    at __TwigTemplate_aad2c7ad5fa6ef6f8642f38cd02a058e->doDisplay() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8218
    at Twig_Template->displayWithErrorHandling() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8196
    at Twig_Template->display() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 8206
    at Twig_Template->render() in /Users/mitchel/Projecten/Symfony/vendor/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php line 59
    at TwigEngine->render() in /Users/mitchel/Projecten/Symfony/vendor/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php line 113
    at TwigEngine->renderResponse() in /Users/mitchel/Projecten/Symfony/src/FOS/UserBundle/Controller/SecurityController.php line 49
    at SecurityController->loginAction()
    at call_user_func_array() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 3905
    at HttpKernel->handleRaw() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 3875
    at HttpKernel->handle() in /Users/mitchel/Projecten/Symfony/app/cache/dev/classes.php line 4879
    at HttpKernel->handle() in /Users/mitchel/Projecten/Symfony/app/bootstrap.php.cache line 552
    at Kernel->handle() in /Users/mitchel/Projecten/Symfony/web/app_dev.php line 27




EDIT:
Sorry guys, now I read the method name again it says: getGetsession
I had a little fix for the gets on the entity's but its not working for the FORUserBundle because they already do it.

problem solved =)
Mitchel
Junior Member
 
Posts: 14
Joined: Tue May 29, 2012 3:46 pm

Return to Bundles discussion

Who is online

Users browsing this forum: No registered users and 1 guest