Jump to content

[SOLVED] Log Out Page show 404 error after upgrade to 1.5.5.0


Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites


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 by Nerque (see edit history)
Link to comment
Share on other sites

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

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

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

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

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

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

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

  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 1 month later...

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

changing this  in   modules/blockuserinfo_mod/views/templates/hook/blockuserinfo.tpl
or 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 by badrelmers (see edit history)
Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...