formapro / FpOpenIdBundle

Symfony2 OpenID security extension
53 stars 31 forks source link

Impossible to access an attribute ("flashbag") on a null variable in FpOpenIdBundle::layout.html.twig at line 16 #100

Closed tkuldeep closed 9 years ago

tkuldeep commented 9 years ago

Hi, I am seeing a exception in using this bundle.

Impossible to access an attribute ("flashbag") on a null variable in FpOpenIdBundle::layout.html.twig at line 16
500 Internal Server Error - Twig_Error_Runtime

Please help me here what should I do here.

makasim commented 9 years ago

has the session been started?

tkuldeep commented 9 years ago

@makasim No session was not started.

makasim commented 9 years ago

flashbag stores data into the session and if it is not started, the session object is not set to request. That's why you see this error.

Solution:

  1. Start session
  2. Overwrite the template and remove flashbag part.
tkuldeep commented 9 years ago

@makasim Thanks a lot. But I think when user will get login, then session should automatically start for that user. So I am not getting what is logic behind starting it manually and also how to do that.