formapro / FpOpenIdBundle

Symfony2 OpenID security extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

tkuldeep opened this issue · comments

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
  • I am using symfony 2.7, "lightopenid/lightopenid":"dev-master" and "fp/openid-bundle": "dev-master"

Please help me here what should I do here.

has the session been started?

@makasim No session was not started.

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.

@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.