You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2016/01/16 11:59:26 UTC
svn commit: r1724955 - in /ofbiz/branches/release15.12: ./
applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Author: deepak
Date: Sat Jan 16 10:59:26 2016
New Revision: 1724955
URL: http://svn.apache.org/viewvc?rev=1724955&view=rev
Log:
Applied fix from trunk for revision: 1724954
===
(OFBIZ-6805) Applied patch from jira issue OFBIZ-6805
============================================================
Session already invalidate (removeAttribute: Session already invalidated) on destroyCart for anonymous userLogin
============================================================
Thanks Ankush for your contribution.
Modified:
ofbiz/branches/release15.12/ (props changed)
ofbiz/branches/release15.12/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Propchange: ofbiz/branches/release15.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jan 16 10:59:26 2016
@@ -9,4 +9,4 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1722712,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951
+/ofbiz/trunk:1722712,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724954
Modified: ofbiz/branches/release15.12/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1724955&r1=1724954&r2=1724955&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/branches/release15.12/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Sat Jan 16 10:59:26 2016
@@ -937,12 +937,13 @@ public class ShoppingCartEvents {
/** Totally wipe out the cart, removes all stored info. */
public static String destroyCart(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
- clearCart(request, response);
session.removeAttribute("shoppingCart");
session.removeAttribute("orderPartyId");
session.removeAttribute("orderMode");
session.removeAttribute("productStoreId");
session.removeAttribute("CURRENT_CATALOG_ID");
+ // Call clearCart at the end as if user is anonymous then it will throw session already invalidated error on removeAttribute method.
+ clearCart(request, response);
return "success";
}