Impossible to access an attribute ("flashbag") on a null variable in FpOpenIdBundle::layout.html.twig at line 16
tkuldeep opened this issue · comments
Kuldeep Singh Pal commented
Hi,
I am seeing a exception in using this bundle.
- I did basic setup by reading https://github.com/formapro/FpOpenIdBundle/blob/master/Resources/doc/basic_setup.md.
- Then I visited url
/login_openid
and saw following exception.
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.
Max Kotliar commented
has the session been started?
Kuldeep Singh Pal commented
@makasim No session was not started.
Max Kotliar commented
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:
- Start session
- Overwrite the template and remove flashbag part.
Kuldeep Singh Pal commented
@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.