khairulaizat92 Posted September 4, 2013 Share Posted September 4, 2013 Hi there guy, i wonder why are suddenly after the upgrade, my logout webpage turn 404 error. TO make it much simple, do you know? when we login as customer, then click the logout button in order to log out?so after my customer click it, it redirect to this link: http://store.globalsolution.com.my/index.php?controller= And turn to 404 Error. Any suggestion in details to a starter like me are really appreciated. 1 Link to comment Share on other sites More sharing options...
mwfloral Posted September 5, 2013 Share Posted September 5, 2013 I am having the exact same problem. I am fairly new to prestashoip as well, so, an easy fix would be greatly appreciated. Link to comment Share on other sites More sharing options...
Nerque Posted September 5, 2013 Share Posted September 5, 2013 (edited) To me too. With 1.5.4.1 I had an error with blockuserinfo, and the issue was the same. Now, with 1.5.5, I am sure that I have all OK, but the problem reappear. For your know, in other versions you should fix the blockuserinfo with correct parameters passed to getPageLink. But with 1.5.5 versión... all is correct but the logout doesn't function correctly. Only occurs when you are on a page of "my-account" group, like "identity" or others. I'am using this link: <a href="{$link->getPageLink('index', true, NULL, 'mylogout')|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a> Any idea? Edited September 5, 2013 by Nerque (see edit history) Link to comment Share on other sites More sharing options...
Nerque Posted September 6, 2013 Share Posted September 6, 2013 Another post with the same problem http://www.prestashop.com/forums/topic/271347-upgrade-from-1541-to-1550-breaks-logout-with-ssl-pages/ Link to comment Share on other sites More sharing options...
Nerque Posted September 6, 2013 Share Posted September 6, 2013 By the moment you can try to override the PageNotFoundController with this (this is not a real solution): class PageNotFoundController extends PageNotFoundControllerCore { public function initContent() { //$_SERVER['REQUEST_URI'] //$_SERVER['HTTPS'] //$_SERVER['SERVER_NAME']) $_mylogout = (strpos($_SERVER['REQUEST_URI'], 'index.php?controller=') !== false); if ($_mylogout) header("Location: http://" . $_SERVER['SERVER_NAME']); else { header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); if (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('png', 'jpg', 'gif'))) { header('Content-Type: image/gif'); readfile(_PS_IMG_DIR_.'404.gif'); exit; } elseif (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('.js', 'css'))) exit; parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'404.tpl'); } } } Link to comment Share on other sites More sharing options...
James_oe Posted September 12, 2013 Share Posted September 12, 2013 Same problem here Link to comment Share on other sites More sharing options...
Kier Posted September 12, 2013 Share Posted September 12, 2013 I have the same problem Link to comment Share on other sites More sharing options...
mtporter Posted September 13, 2013 Share Posted September 13, 2013 With a few test accounts when logging off I get the same problem but not only that it does not log the user out. I get the 404 page as well. Link to comment Share on other sites More sharing options...
mtporter Posted September 13, 2013 Share Posted September 13, 2013 I have 2 other PS 'work in progress' sites at 1.5.4.1 that I do believe I'll stick with until 1.5.5 is fixed. Link to comment Share on other sites More sharing options...
khairulaizat92 Posted September 13, 2013 Author Share Posted September 13, 2013 Ermmm, i wonder, didnt presta take this case seriously, its quite big bugs they have there... Link to comment Share on other sites More sharing options...
mtporter Posted September 16, 2013 Share Posted September 16, 2013 Prestashop... where are you?? This is a major bug! Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 18, 2013 Share Posted September 18, 2013 Hello, I can see that many people are having the same issue. What version of the upgrade module did you use? Does it work with ssl turned off? Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 19, 2013 Share Posted September 19, 2013 Prestashop... where are you?? This is a major bug! Hello all, please use this Github solution and let me know if it works. -https://github.com/P...63b73c13eab5f2e Always remember to have a complete back up! 1 Link to comment Share on other sites More sharing options...
mtporter Posted September 19, 2013 Share Posted September 19, 2013 hmmm, didn't work for me... but at least now don't get 404 screen, it just simply does not log off a user, keeps them logged in FOREVER Link to comment Share on other sites More sharing options...
Kier Posted September 21, 2013 Share Posted September 21, 2013 (edited) First time I tried, I would just get a blank page when I tried to access my site. Figured maybe I copied wrong so tried again. I could then get the FO OK but then I couldn't get into my BO. So, didn't work for me after all. Edited September 21, 2013 by Kier (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 23, 2013 Share Posted September 23, 2013 Hello all, that fix seemed to work for multiple people in this thread http://www.prestashop.com/forums/topic/271347-solved-upgrade-from-1541-to-1550-breaks-logout-with-ssl-pages/ Does it work with SSL turned off or on? Or does that not effect the issue? Link to comment Share on other sites More sharing options...
Kier Posted September 25, 2013 Share Posted September 25, 2013 Hi Benjamin, If I turn off SSL, I don`t have the problem, the site correctly redirects to the login screen upon logout. If I turn on SSL, it goes to the 404 page. The code change seems to break my ability to get in the BO. With the change implemented, with Firefox, when I put in my credentials, it will say the employee doesn`t exist. If I use IE, when I put in my credentials, it redirects to the 404 page. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 26, 2013 Share Posted September 26, 2013 Hi Benjamin, If I turn off SSL, I don`t have the problem, the site correctly redirects to the login screen upon logout. If I turn on SSL, it goes to the 404 page. The code change seems to break my ability to get in the BO. With the change implemented, with Firefox, when I put in my credentials, it will say the employee doesn`t exist. If I use IE, when I put in my credentials, it redirects to the 404 page. What code changes did you do? The only change you should have done was the link in Github that I provided. However, there was a temporary solution provided by Nerque that should not have been done combined with the fix that we provided. Link to comment Share on other sites More sharing options...
Kier Posted September 26, 2013 Share Posted September 26, 2013 The only change I did was the one in the link you provided. Replaced line 604 with the new line highlighted in green. I will add though I am not running the default theme. Sorry I should have said this before. Link to comment Share on other sites More sharing options...
Nerque Posted September 27, 2013 Share Posted September 27, 2013 I have another theme too, and the Benjamin's solution is working ok for me. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 27, 2013 Share Posted September 27, 2013 I have another theme too, and the Benjamin's solution is working ok for me. Hi Nerque, yes I posted this and it seems to fix the issue. Were you only having issues with logout with SSL on? It worked when it was off? Link to comment Share on other sites More sharing options...
Kier Posted October 1, 2013 Share Posted October 1, 2013 Hi, Just a quick update here. As previously mentioned, I couldn't seem to get in my back office once I implemented this fix. I had some more time this morning so started playing with it a bit more and tried again. I've got it working now, but had to reset all the employee passwords. After this, all worked good! Thanks Link to comment Share on other sites More sharing options...
mtporter Posted October 8, 2013 Share Posted October 8, 2013 Even updating to 1.5.6 did not resolve issue!! Cannot log out Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 8, 2013 Share Posted October 8, 2013 Even updating to 1.5.6 did not resolve issue!! Cannot log out Logging out still gives you a 404 error? Is this with and/or without ssl? It may be a different issue. Link to comment Share on other sites More sharing options...
mtporter Posted October 8, 2013 Share Posted October 8, 2013 No 404 screen... just stayed logged in only Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 8, 2013 Share Posted October 8, 2013 Have you tried all browsers? Make sure to have a backup and change your CCC settings in the back office. Also, if you have friendly url on, you should try to turn toggle it to see if it works for you. Always make sure to have a back up How to Manually Back Up your PrestaShop Database and Files The problem usually can be solved using one of these suggestions. Also, can you make a new thread as this is a separate problem. I will move the posts from this thread to the new one once you create it. Thank you so much! We just want to keep solved issues together. Link to comment Share on other sites More sharing options...
sant009m Posted October 9, 2013 Share Posted October 9, 2013 Hi, Today I upgraded to version 1.5.6 and the login / logout issue started again. Earlier with 1.5.5 I had same issue but resolved updating the dispatcher.php file as mentioned in github link this forum, You can check my online store below. http://gadgetsduniya.abcz8.com/presta/ I have already tried with clearing the browser history and different browsers. Regards, Santosh Link to comment Share on other sites More sharing options...
sant009m Posted October 10, 2013 Share Posted October 10, 2013 (edited) I found the solution for the issue online In .htaccess you have to add this lines: ExpiresActive On ExpiresDefault "access plus 1 days" ExpiresByType text/html "access plus 0 minutes" After this the logout works just fine. Edited October 11, 2013 by sant009m (see edit history) Link to comment Share on other sites More sharing options...
mtporter Posted October 10, 2013 Share Posted October 10, 2013 Nope.. the above code did not work... Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 10, 2013 Share Posted October 10, 2013 I found the solution for the issue online In .htaccess you have to add this lines: ExpiresActive OnExpiresDefault "access plus 1 days"ExpiresByType text/html "access plus 0 minutes" After this the logout works just fine. You had an issue with the 404 screen showing after you log out? Link to comment Share on other sites More sharing options...
mtporter Posted October 10, 2013 Share Posted October 10, 2013 I did at the beginning... now it simply keeps me logged in even if I select 'logout' Link to comment Share on other sites More sharing options...
sant009m Posted October 10, 2013 Share Posted October 10, 2013 I did at the beginning... now it simply keeps me logged in even if I select 'logout' Also update the dispatcher.PHP file link is in same thread Link to comment Share on other sites More sharing options...
mtporter Posted October 10, 2013 Share Posted October 10, 2013 I've updated htaccess and dispatcher files... no joy Link to comment Share on other sites More sharing options...
karkung Posted October 11, 2013 Share Posted October 11, 2013 (edited) thanks Edited October 11, 2013 by karkung (see edit history) Link to comment Share on other sites More sharing options...
khairulaizat92 Posted October 11, 2013 Author Share Posted October 11, 2013 My problem solved after upgrading to 1.5.6.0, and everything working normal again. Link to comment Share on other sites More sharing options...
sant009m Posted October 11, 2013 Share Posted October 11, 2013 Hey mtporter, please update .htaccess file as below ExpiresActive OnExpiresDefault "access plus 1 days"ExpiresByType text/html "access plus 0 minutes" Link to comment Share on other sites More sharing options...
mtporter Posted October 11, 2013 Share Posted October 11, 2013 I have. I've updated my .htaccess file to the above and as well as the dispatcher.php file... I added the above to the .htaccess file at the very bottom, does it matter where placed? Link to comment Share on other sites More sharing options...
sant009m Posted October 11, 2013 Share Posted October 11, 2013 I have. I've updated my .htaccess file to the above and as well as the dispatcher.php file... I added the above to the .htaccess file at the very bottom, does it matter where placed? I don't know if that matters, I have placed it on top and also I have disabled cache from admin panel. Try that too Link to comment Share on other sites More sharing options...
guanooo Posted November 13, 2013 Share Posted November 13, 2013 Benjamin's solution from post #13 is working ok for me with SSL On. Thanks. 1 Link to comment Share on other sites More sharing options...
Mr S Posted December 20, 2013 Share Posted December 20, 2013 Benjamin's solution from post #13 is working ok for me with SSL On. Thanks. Same here Thanks Benjamin Link to comment Share on other sites More sharing options...
Ron morales Posted January 21, 2014 Share Posted January 21, 2014 (edited) In ps 1.5.6.1 only in chrome not logout this line is changed this post 13 , in mac osx Edited January 21, 2014 by Ron morales (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted January 21, 2014 Share Posted January 21, 2014 In ps 1.5.6.1 only in chrome not logout this line is changed this post 13 , in mac osx Did you upgrade your store or was it a fresh install? It may be a different issue. Thanks Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 its a new instalatition Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 The shop is newly installed in prestashop 1.5.6.1, now I put a template, I'll try to removeseo url with all browsers goes well with less chrome Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 This problem its wen in seo url www.domain.com and domain.com yes work, how to solution in htaccess? Link to comment Share on other sites More sharing options...
benjamin utterback Posted January 22, 2014 Share Posted January 22, 2014 Hi Ron, I'm sorry I don't understand your issue. Have you posted this in detail on the Spanish Forum? http://www.prestashop.com/forums/forum/82-foro-en-espanol/ I think that would give you a better response. Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 (edited) when put www in seo url -domain shop not work, when put without www work. Edited January 22, 2014 by Ron morales (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted January 22, 2014 Share Posted January 22, 2014 Cool, now I understand better. In your Preferences>SEO&URL's, Do you have "Redirect to Canonical URL" enabled? Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 yes its enable Link to comment Share on other sites More sharing options...
Ron morales Posted January 22, 2014 Share Posted January 22, 2014 yes its enable i test disable, but not working Link to comment Share on other sites More sharing options...
badrelmers Posted February 27, 2014 Share Posted February 27, 2014 Hi i have the same problem temporal solutions solution 1: active Preferences > General Force the SSL on all the pages ,now I can logout fine but all my site stay in ssl. solution 2: disable ssl . I use prestashop 1.5.6.2 new and clean install (I didn t update from a previews version) + a theme for 1.5.6.0 + ssl + seo disabled dispatcher is already updated i test it with a white htaccess then with the regenerated one by prestashop, then removing it completely doesn t change anything I found a solution that i can t program in php (of course with "Force the SSL on all the pages" disabled) as you know the logout link is like this https://mysite.com/index.php?mylogout= , if a change the https to http then a past this link in browser http://mysite.com/index.php?mylogout= it did logout fine (no 404 no ssl in all my site, everything ok but i don t know what do i need to change in php , help pls this is the best solution i see ) thank you very much for you help Link to comment Share on other sites More sharing options...
badrelmers Posted February 27, 2014 Share Posted February 27, 2014 (edited) changing this in modules/blockuserinfo_mod/views/templates/hook/blockuserinfo.tplor here if using default theme modules/blockuserinfo/blockuserinfo.tpl$link->getPageLink('index', true, NULL, "mylogout"to this$link->getPageLink('index', false, NULL, "mylogout"did work well too , now ssl + logout work well Edited February 28, 2014 by badrelmers (see edit history) Link to comment Share on other sites More sharing options...
elcieloenlatierra.es Posted March 30, 2014 Share Posted March 30, 2014 Benjamin's solution from post #13 is working ok for me with SSL On. Thanks. Same for me! Thanks Benjamin! Link to comment Share on other sites More sharing options...
Recommended Posts