Jens Italy Posted June 16, 2011 Share Posted June 16, 2011 HelloI am using a non-modified install of PS 1.4.2.5 and when a logged-in customer clicks "logout" (link: ?mylogout) the customer is not logged out, but stays on the url my-account.phpReloading the page (F5) takes me to the link authentication?back=my-account.phpBut if I click the link "Your Accuon" (url: my-account,) I am taken back to my customer account page, and I am still not logged out.Only after deleting cookies and emptying browser cache am I effectively logged out.---I doubt it is a browser setting issue, as I have previous (a.3) PS installs on the server, and their logouts are working well without having to delete cookies/cache.Help is indeed needed :-)Jens Link to comment Share on other sites More sharing options...
aldocampione Posted June 16, 2011 Share Posted June 16, 2011 HelloI am using a non-modified install of PS 1.4.2.5 and when a logged-in customer clicks "logout" (link: ?mylogout) the customer is not logged out, but stays on the url my-account.phpReloading the page (F5) takes me to the link authentication?back=my-account.phpBut if I click the link "Your Accuon" (url: my-account,) I am taken back to my customer account page, and I am still not logged out.Only after deleting cookies and emptying browser cache am I effectively logged out.---I doubt it is a browser setting issue, as I have previous (a.3) PS installs on the server, and their logouts are working well without having to delete cookies/cache.Help is indeed needed :-)Jens I have the same problem Link to comment Share on other sites More sharing options...
Jens Italy Posted June 16, 2011 Author Share Posted June 16, 2011 I now also see that another PS site which uses PS 1.3 suddenly has the same issue.This used to work fine.A couple of weeks ago the server tech upgraded my server from an OS32bit to a 64bit operatin system, and they did a re-image of the server before the upgrade.At the same time the php handler was swithched to suPHP.Could this be the root of the problem?BestJens Link to comment Share on other sites More sharing options...
Jens Italy Posted June 20, 2011 Author Share Posted June 20, 2011 Seems that the user actually gets logged out, only that upon logout the user does not get redirected to the right pages. When clicking logged out, the user is remains on the page on where he clicked the logout. However trying to click on "my account" after logout, the user is redirected to the authentication page, but this is really a huge problem. Link to comment Share on other sites More sharing options...
aldocampione Posted June 20, 2011 Share Posted June 20, 2011 Seems that the user actually gets logged out, only that upon logout the user does not get redirected to the right pages. When clicking logged out, the user is remains on the page on where he clicked the logout. However trying to click on "my account" after logout, the user is redirected to the authentication page, but this is really a huge problem. If you go to the page MY ACCOUNT after having logged out you will see the page. Then if you click on one of the choice you will be redirected to the login page Link to comment Share on other sites More sharing options...
Jens Italy Posted June 20, 2011 Author Share Posted June 20, 2011 Yes, this is what happens.And where are sessions/cookies saved in prestashop? Link to comment Share on other sites More sharing options...
aldocampione Posted June 20, 2011 Share Posted June 20, 2011 Yes, this is what happens.And where are sessions/cookies saved in prestashop? I changed frontcontroller.php in classes folder and replacedTools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);with thisTools::redirect('/'); Link to comment Share on other sites More sharing options...
Jens Italy Posted June 20, 2011 Author Share Posted June 20, 2011 Yes, that will work to get you to the front page after logout, however, if you click f.ex "my account" you still get taken to the my account page which shows this:Welcome to your account. Here you can manage your addresses and orders.History and details of my ordersMy credit slipsMy addressesMy personal informationMy vouchersTrue, clicking any of those links, you will get taken to the login page, but still a huge ugly bug.BestJens Link to comment Share on other sites More sharing options...
aldocampione Posted June 20, 2011 Share Posted June 20, 2011 Yes, that will work to get you to the front page after logout, however, if you click f.ex "my account" you still get taken to the my account page which shows this:Welcome to your account. Here you can manage your addresses and orders.History and details of my ordersMy credit slipsMy addressesMy personal informationMy vouchersTrue, clicking any of those links, you will get taken to the login page, but still a huge ugly bug.BestJens I AGREEEE !! But no one gives an answer about this Link to comment Share on other sites More sharing options...
Jens Italy Posted June 25, 2011 Author Share Posted June 25, 2011 I am surprised that no one from the support team is replying to these logout issues.I have searched high and low in these forums as well as in other prestashop related forums, and I have seen many report this problem. Yet there seems to be no solution.This, in my opinion makes PrestaShop a solution to avoid. It may be something on the servers we are using, but we need some input from the prestashop developers.Up until I experienced this issue I was very happy with prestashop, but such a huge bug has made me wonder if it is time to buy a shop solution instead of going "open source"Using a shop system with this kind of problem will make me look very bad in the eyes of my customers, and woiuld eventually make me lose my business.Jens Link to comment Share on other sites More sharing options...
Patric Posted June 27, 2011 Share Posted June 27, 2011 Hi,Did you report this bug on our forge : http://forge.prestashop.com/secure/Dashboard.jspaYou mention other reports about that. Have you got the corresponding URLs ?Thanks. Link to comment Share on other sites More sharing options...
apr3455 Posted July 8, 2011 Share Posted July 8, 2011 Solution:Open FrontController and modify:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}to:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ header("Cache-Control: no-cache, must-revalidate"); $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ header("Cache-Control: no-cache, must-revalidate"); $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}and it works! 1 Link to comment Share on other sites More sharing options...
aldocampione Posted July 11, 2011 Share Posted July 11, 2011 Solution:Open FrontController and modify:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}to:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ header("Cache-Control: no-cache, must-revalidate"); $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ header("Cache-Control: no-cache, must-revalidate"); $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}and it works! PERFECT !!! Link to comment Share on other sites More sharing options...
aldocampione Posted July 11, 2011 Share Posted July 11, 2011 Solution:Open FrontController and modify:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}to:if (isset($_GET['logout']) OR ($cookie->logged AND Customer::isBanned((int)$cookie->id_customer))){ header("Cache-Control: no-cache, must-revalidate"); $cookie->logout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}elseif (isset($_GET['mylogout'])){ header("Cache-Control: no-cache, must-revalidate"); $cookie->mylogout(); Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL);}and it works! SORRY. It does not work.It works only with Firefox. Not with Chrome & IE Link to comment Share on other sites More sharing options...
TommyKaneko Posted July 18, 2011 Share Posted July 18, 2011 I wanted to add to the growing group of people who recognises this as a big bug.Chrome simply does not seem to be receiving/recognising any cookies. This is bad. It means carts empty, and customers cannot buy anything.I've had a look to see if this is more of a Chrome issue than Prestashop. There do seem to have been problems with other web applications concerning Chrome and cookies. I have found the following pages that may offer clues to those of us who know the inner workings of Prestashop:http://www.yireo.com/blog/1296-windows-7-google-chrome-magento-admin-cookie-problemhttp://www.google.com/support/forum/p/Chrome/thread?tid=0a3388748cd8ff9b&hl=enhttp://stackoverflow.com/questions/2507664/google-chrome-cookie-issues 1 Link to comment Share on other sites More sharing options...
TommyKaneko Posted July 19, 2011 Share Posted July 19, 2011 I managed to solve this problem by uninstalling and installing a module (strangely). My site was upgraded from 1.3 to 1.4, so this may have something to do with the problems I've been having....So try uninstalling some of your modules (just disabling them does not seem to work), then install them again....Good luck! Link to comment Share on other sites More sharing options...
Jens Italy Posted July 27, 2011 Author Share Posted July 27, 2011 I managed to solve this problem by uninstalling and installing a module (strangely). My site was upgraded from 1.3 to 1.4, so this may have something to do with the problems I've been having....<br/><br/>So try uninstalling some of your modules (just disabling them does not seem to work), then install them again....<br/><br/>Good luck! But which modules did you uninstall and re-install? Link to comment Share on other sites More sharing options...
Jens Italy Posted August 2, 2011 Author Share Posted August 2, 2011 Hello My issue was solved. It appeared that a global server setting needed to be modified. Here is what the tech/support told me: ======== it appears that there was a global setting set for expires in your apache config. This was causing a situation where if you requested /?mylogout , it was not actually forcing a redirect to /my-account because it was cached and the expires was set for +2 days from original request. I've disabled this setting in /usr/local/apache/conf/includes/pre_main_globa.conf. ===== This did the trick for me. Best JEns Link to comment Share on other sites More sharing options...
mdjnrj Posted August 4, 2011 Share Posted August 4, 2011 the problem is in the link couse you probably generate link index.php?mylogout when logout the issue will fix the changing this link when loggin out from the prestashop insted of index.php?mylogout to authentication.php?mylogout in the tpl files its not about the cache/cookies troubles its about wrong link when logging out best example of it will be to login as a customer at prestashop and going to link: http://yourdomainname .com/authentication.php?mylogout and you will see that it will logout automatickly without any troubles i guess of cours in the word yourdomainname you have to write your domain name Link to comment Share on other sites More sharing options...
shebkhan Posted November 22, 2011 Share Posted November 22, 2011 Hello Guys. a simple solution to this problem put ?t={$smarty.now} in your signin link. In BlockUserinfo.tpl file search for both login and logout link put this ?t={$smarty.now} at end now the url wlil not be cached. Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts