Jump to content

Afther upgrade 5.2.9 Product submit problems


Recommended Posts

Hello,

 

I has yesterday starting the upgrade afther a new fresh 5.2.8 installation.

On this moment i bin configurate a webshop for an client of me.

 

But afther the upgrade i have problem, when i cilck on the Save button afther a change in a product, then reset CubeCart to the login screen.

Afther a couple of time trying, then is the change saved.

Als when you want add a product image to a product is the select screen emty.

Afther a couple of time to try, then is the view from the image select screen normal.

 

When you must by building a shop updating more products is this not verry fine to do it with this problem.

 

I have try with IE 10, FireFox and Google Chrome.

 

All has the same effect.

 

With kind regards,

 

Martin

Link to comment
Share on other sites

This is related to the following code in the session class;

$old_sessionid = $this->getId();
session_regenerate_id(true);
		
//Use the instance because the global might be gone already
Database::getInstance()->update('CubeCart_sessions', array('session_id'	=> session_id()), array('session_id' => $old_sessionid), false);

If you remove this code it will fix this issue. RIght now I am trying to figure out why this issue happens. I think its due to session ID change on AJAX calls but making an exception to only run this when $_GET['_g'] is not 'xml' doesn't fix it. 

 

I'm pretty sure this only happens when you visit pages that actively have an ajax call. Of course this slipped though testing with this release. 

 

We will try to figure out a patch and get it out on Monday as 5.2.10. In the mean time please either remove or comment out the code above or roll back to 5.2.8. I'm sorry for any inconvenience caused. 

Link to comment
Share on other sites

Your site is hosted somewhere. Your hosting provider probably gives you a control panel to log into to manage your site. Perhaps that control panel is cPanel, or Plesk.

 

Log in to your hosting account. You should be given a set of utilities, perhaps even a text editor.

 

Use the text editor to browse the files of your site, specifically the folders of CubeCart, and open this file to edit:

/classes/session.class.php

 

The editor will show the code along with line numbers. Scroll to line 597. You should now see these lines of code:

  $old_sessionid = $this->getId();
  session_regenerate_id(true);
        
  //Use the instance because the global might be gone already
  Database::getInstance()->update('CubeCart_sessions', array('session_id'    => session_id()), array('session_id' => $old_sessionid), false);
        
  // Increase session length on each page load. NOT IE however as we all know it is a wingy PITA
  if($this->_http_user_agent()=='IEX') {
    $this->set_cookie(session_name(),session_id(),time()+$this->_session_timeout);
  }

Edit those lines of code look like this:

  //$old_sessionid = $this->getId();
  //session_regenerate_id(true);
        
  //Use the instance because the global might be gone already
  //Database::getInstance()->update('CubeCart_sessions', array('session_id'    => session_id()), array('session_id' => $old_sessionid), false);
        
  // Increase session length on each page load. NOT IE however as we all know it is a wingy PITA
  if($this->_http_user_agent() !== 'IEX') {
    $this->set_cookie(session_name(),session_id(),time()+$this->_session_timeout);
  }

Have the editor save the file.

 

You can log out of your control panel.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...