View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002655||OXID eShop (all versions)||4.07. Source code, Test||public||2011-03-27 23:14||2012-12-10 13:44|
|Product Version||4.4.7 revision 33396|
|Target Version||Fixed in Version||4.5.3 revision 39087|
|Summary||0002655: oxuserbasket and oxuserbasketitems not loaded when oxid_oxbaseshop cookie used|
|Description||(1a). The customer logs-in with "Remember Me" selected. This correctly sets the oxid_oxbaseshop cookie with 12 months lifetime|
(2a). The customer adds items to the basket and this works as normal
(3a). The customer closes the browser. This deletes the session cookies and correctly leaves the oxid_oxbaseshop cookie in the browser
(4a). Later, the customer opens a new browser window and is automatically logged in with the oxid_oxbaseshop cookie BUT THE BASKET IS EMPTY
This is because in (4a) oxuserbasket->load() is never called, so the saved basket is not loaded from the oxuserbaskets and oxuserbasketitems tables and is not copied into the session.
When oxcmp_basket->render() calls oxbasket->calculateBasket(), this deletes the saved oxuserbasket. Since the session oxbasket is empty, it saves nothing to oxuserbaskets and oxuserbasketitems.
By comparison, this is how it correctly works with "Remember Me" not selected.
(1b). The customer logs-in with "Remember Me" NOT selected.
(2b). The customer adds items to the basket and this works as normal
(3b). The customer closes the browser. This deletes the session cookies
(4b). Later, the customer opens a new browser window and logs-in again. THE BASKET IS LOADED CORRECTLY
This is because in (4b) oxcmp_user->login_noredirect calls oxcmp_user->login, which calls oxuser->login, which calls oxbasket->load() on line 1260 of oxuser.php. This correctly loads the saved user basket from the oxuserbaskets and oxuserbasketitems tables and copies this into the oxbasket, and adds oxbasket to the session.
Then, oxcmp_basket->render() calls oxbasket->calculateBasket(). This correctly loads and deletes the old oxuserbasket contents and saves the new contents of oxbasket into oxuserbaskets and oxuserbasketitems. At the end, oxstart->pageoxshopcontrol->pageClose() calls oxsession->freeze, which serializes oxbasket and saves it in the session.
|Additional Information||Just a final comment: in (4a), no session is started, but in (4b), the POST parameter login_noredirect means that in oxsession.php _isSessionRequiredAction() correctly returns true and initNewSession() is called, which starts a new session.|
I don't think this is a problem for oxuserbasket, but should (4a) start a session for the logged-in user ?
|Tags||No tags attached.|
small typo: last line should read oxstart->pageClose()
I have not fully tested it, but I think this bug is also in 4.5.0_beta3
1) problem still exist in 4.5.0.
2) also, if ssl is on, such error is shown after user opens new browser window:
Cookie not found, creating new SID...