Jump to content

Customer Logout Issue in PS 1.4.2.5


Recommended Posts

Hello

I 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.php

Reloading the page (F5) takes me to the link authentication?back=my-account.php

But 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

Hello

I 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.php

Reloading the page (F5) takes me to the link authentication?back=my-account.php

But 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

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?

Best
Jens

Link to comment
Share on other sites

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

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

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 orders
My credit slips
My addresses
My personal information
My vouchers

True, clicking any of those links, you will get taken to the login page, but still a huge ugly bug.

Best
Jens

Link to comment
Share on other sites

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 orders
My credit slips
My addresses
My personal information
My vouchers

True, clicking any of those links, you will get taken to the login page, but still a huge ugly bug.

Best
Jens


I AGREEEE !! But no one gives an answer about this
Link to comment
Share on other sites

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

  • 2 weeks later...

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!

  • Like 1
Link to comment
Share on other sites

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

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

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-problem
http://www.google.com/support/forum/p/Chrome/thread?tid=0a3388748cd8ff9b&hl=en
http://stackoverflow.com/questions/2507664/google-chrome-cookie-issues

  • Like 1
Link to comment
Share on other sites

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

  • 2 weeks later...

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

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

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

  • 3 months later...
×
×
  • Create New...