Describe the bug
Prestashop Back office log me out and when i try to reconnect he keep me in same page. I can't log in until i clear my browser cache. I tried this solution nothing happen, the problem persist #10244.
Apache Error Log show this PHP Notice when trying to reconnect:
[Wed Jun 26 09:36:07.655609 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: id_parent in /PATH/TO/PRESTA/classes/Tab.php on line 593, referer: URL/admin
[Wed Jun 26 09:36:07.655681 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 583, referer: URL/admin
[Wed Jun 26 09:36:07.655691 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/controller/AdminController.php on line 584, referer: URL/admin
[Wed Jun 26 09:36:07.655697 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: class_name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 585, referer: URL/admin
[Wed Jun 26 09:36:07.655913 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: class_name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 587, referer: URL/admin
[Wed Jun 26 09:36:07.655951 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 633, referer: URL/admin
[Wed Jun 26 09:36:07.931973 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: id_parent in /PATH/TO/PRESTA/classes/Tab.php on line 593, referer: URL/admin
[Wed Jun 26 09:36:07.932023 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 583, referer: URL/admin
[Wed Jun 26 09:36:07.932032 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 584, referer: URL/admin
[Wed Jun 26 09:36:07.932038 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: class_name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 585, referer: URL/admin
[Wed Jun 26 09:36:07.932166 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: class_name in /PATH/TO/PRESTA/classes/controller/AdminController.php on line 587, referer: URL/admin
[Wed Jun 26 09:36:07.932207 2019] [php7:notice] [pid 25267] [client ] PHP Notice: Undefined index: name in /PATH/TO/PRESTA/controller/AdminController.php on line 633, referer: URL/admin
Additionnal information
PrestaShop version: 1.7.5.1
PHP version: 7.2.17-0ubuntu0.18.04.1
Hi @MarouaniALA,
Thanks for your report.
After removal of cache rm -fR var/cache/*, could you please try to run those commands:
php -d memory_limit=-1 ./bin/console cache:clear
php -d memory_limit=-1 ./bin/console cache:clear --env=prod
Thanks to check & feedback.
Hi @khouloudbelguith,
same problem same error log..
@MarouaniALA, when you're logged in and hit just "refresh" (F5) you're also redirected to login page again?
the same problems you've got in the front office? for example, add something to the cart, then refresh the website, the cart is empty then?
Thanks!
@khouloudbelguith,
NO, and i don't have problem with FO
@MarouaniALA, in the BO => Advanced Parameters => Administration, disable the "Check the cookie's IP address" option, clear cache, check & feedback.
@khouloudbelguith,
IP address already disabled, i cleared presta cache and the problem persist i can't connect until i clear my browser cache or login from private window
@MarouaniALA, did you upgraded my chrome browser to a new version, this is could cause the issue, cookies were removed.
Have you the same issue with another browse?
Thanks!
@khouloudbelguith,
the problem with all browsers.
@MarouaniALA, Could you please provide access to your shop to test it.
This is a public space.
You can provide me the credentials by email.
My address mail: khouloud.[email protected]
Let's be safe!
Thanks!
@MarouaniALA, I just sent you an email, thanks to check it.
@khouloudbelguith,
ok Thanks
@MarouaniALA, I just received the email.
I will check & feedback.
Thanks!
@MarouaniALA, I sent you a screen record.
Thanks to check & feedback.
Thanks!
@MarouaniALA,
checked and i replied
thanks
@MarouaniALA, I checked with my browser.
If Check the cookie's IP address" option is disabled => I'm logging out after a time, I need to access to the link BO: after loading this link shop.com/admin-dev/index.php?controller=AdminLogin
again.
If Check the cookie's IP address" option is enabled => I can log in again without reloading the link of the BO.
I sent you a screen record.
Thanks!
@khouloudbelguith, can't open the screen record
i see same PHP Notice 'undefined index' when the you reproduced the problem. should i keep "Check the cookie's IP address" option enabled ?
thanks
@MarouaniALA, I just resend you an email.
Thanks!
@khouloudbelguith, sorry for this late reply.
I just send you an email.
Thanks!
@MarouaniALA, I sent you an email.
Thanks!
Hi @MarouaniALA,
Your issue is related to cookies.
Here are some things you can try :
1/ Clear your browser cache and your cookies
2/ Check PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in ps_configuration table
3/ Manually clear smarty cache: remove all files from /var/cache/
4/ Disable the IP check in classes/Cookie.php (this can cause many issues with dynamics IP)
5/ Into the path /PROJECT_FOLDER/classes/controller/AdminController.php, replace 900 to 3600 which increases the log-in period from 15 to 60 minutes.
replace this:
if ($this->context->cookie->last_activity + 900 < time()) {
By this:
if ($this->context->cookie->last_activity + 3600 < time()) {
Thanks to check & feedback.
@khouloudbelguith thanks for your support the problem caused by pagespeed module of prestashop
Hi @MarouaniALA,
Thanks for your feedback.
As it's not a module provided by Prestashop, we can't do anything with this.
You should contact the module author via your addons.prestashop.com account, they are the only ones to help you with it.
Thanks!
Hi @MarouaniALA,
Thanks for your report.
After removal of cache rm -fR var/cache/*, could you please try to run those commands:php -d memory_limit=-1 ./bin/console cache:clear php -d memory_limit=-1 ./bin/console cache:clear --env=prod
Thanks to check & feedback.
Hello. Can you help me too? i have the same problem. Login -logout after some seconds. Cannot even make any activities in BO.