Martin Verkerk Posted April 11, 2014 Share Posted April 11, 2014 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 11, 2014 Share Posted April 11, 2014 We are looking into this. When CubeCart gives you the login screen, it is because the session was "cancelled". But we do not know yet why that happens. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 11, 2014 Share Posted April 11, 2014 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. Quote Link to comment Share on other sites More sharing options...
Martin Verkerk Posted April 11, 2014 Author Share Posted April 11, 2014 I have remove the code. Thanks for this solution, its solved. Quote Link to comment Share on other sites More sharing options...
moonette Posted April 11, 2014 Share Posted April 11, 2014 This is causing me big problems today. Not sure how to remove that snippet of code or how to "rollback" to the previous version. Can I get a litte more direction/instructions on those solutions? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 11, 2014 Share Posted April 11, 2014 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. Quote Link to comment Share on other sites More sharing options...
moonette Posted April 12, 2014 Share Posted April 12, 2014 That fixed my problem. You saved me again! Thanks so much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.