Jump to content

[SOLVED] Upgrade from 1.5.4.1 to 1.5.5.0 breaks logout with SSL pages


Recommended Posts

I upgraded two shops from 1.5.4.1 to 1.5.5.0 - both shops have SSL and use friendly URLs.

 

There is a problem when logged in with a page that uses SSL. If the user clicks on logout from an SSL page, they are logged out and directed to the 404 page not available screen.

Page not available

 

We're sorry, but the Web address you entered is no longer available

To find a product, please type its name in the field below

 

 

 

This does not occur if the user clicks logout from a page that does not use SSL.

 

In the BO if I disable friendly URL, it fixes the problem. I have cleared the cache, forced compile, etc and the problem still occurs. This behavior is on my custom modified theme, and the PS default them, so isn't theme related.

 

Does anyone else have this problem, or is it unique to my installations? Any suggestions on how to fix it?

  • Like 1
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

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?

I used 1 click upgrade module 1.0.26 which was the current version at the time of the upgrade.  Per my original post I don't have the problem by turning off SSL or disabling friendly URLs.  This problem wasthe same on 3 shops I tried to upgrade.  Rather than live with problem, I elected to wait until some of the bugs in 1.5.5.0 get fixed and continue running 1.5.4.1 on these shops.

Link to comment
Share on other sites

×
×
  • Create New...