[jira] Created: (OFBIZ-3698) Browse sub-categories exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3698) Browse sub-categories exception

Nicolas Malin (Jira)
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: [hidden email]
             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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3698) Browse sub-categories exception

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

[hidden email] updated OFBIZ-3698:
---------------------------------------------

    Attachment: patch

> 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: [hidden email]
>             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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3698) Browse sub-categories exception

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856842#action_12856842 ]

Jacques Le Roux commented on OFBIZ-3698:
----------------------------------------

Sorry but I don't think your patch fixes this issue, did you try it? For instance try to click 2 times on the widgets category: you will get an NPE
BTW I have fixed this issue at r933902, but if you think you can contribute a better solution, I'm open, else please close this issue

Thanks

> 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: [hidden email]
>             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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-3698) Browse sub-categories exception

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

[hidden email] closed OFBIZ-3698.
--------------------------------------------

    Resolution: Fixed

Fixed by Jacques. Thanks

> 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: [hidden email]
>             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