Browse sub-categories exception
-------------------------------
Key: OFBIZ-3698
URL: https://issues.apache.org/jira/browse/OFBIZ-3698
Project: OFBiz
Issue Type: Bug
Components: product
Affects Versions: SVN trunk
Reporter: [email protected]
Fix For: SVN trunk
Attachments: patch
When browsing sub categories (for example, click on Large Gizmos [102] -->
https://demo-trunk.ofbiz.apache.org/catalog/control/EditCategory?productCategoryId=102&pcategory=100),
we get the following exception :
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
[component://product/widget/catalog/CommonScreens.xml#sidedeepcategory]:
java.lang.UnsupportedOperationException (null)
Here's the patch :
Index: applications/product/src/org/ofbiz/product/category/CategoryWorker.java
===================================================================
--- applications/product/src/org/ofbiz/product/category/CategoryWorker.java
(revision 931207)
+++ applications/product/src/org/ofbiz/product/category/CategoryWorker.java
(working copy)
@@ -25,7 +25,6 @@
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import javax.servlet.jsp.PageContext;
import javolution.util.FastList;
@@ -293,7 +292,9 @@
} else {
// remove all categories after the previous category, preparing
for adding the current category
int index = trail.indexOf(previousCategoryId);
- trail = trail.subList(0, index);
+ List<String> subList = trail.subList(0, index+1);
+ trail = FastList.newInstance();
+ trail.addAll(subList);
}
// add the current category to the end of the list
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira