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

Nicolas Malin commented on OFBIZ-12273:
---------------------------------------

Hi,

I also detected the problem when you use the searchBox on product and jump to a 
specific page.

I can't reproduce to demo-trunk but with the localhost this error is raised

I correct it on my local with
{code:java}
Index: framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
===================================================================
diff --git 
a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java 
b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java     
(revision 7120cf7d5f264830385105dea233c7f56998242e)
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java     
(date 1625239027731)
@@ -1740,6 +1740,9 @@
         while (matcher.find()) {
             result.add(matcher.group());
         }
+        if (result.isEmpty()) {
+            result.add(input);
+        }
 
         return result;
     }{code}
But I imagine there is a better solution

> IndexOutOfBoundsException on Entity Import
> ------------------------------------------
>
>                 Key: OFBIZ-12273
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12273
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: 18.12.01, Release Branch 17.12, Trunk
>            Reporter: Sebastian Berg
>            Priority: Major
>
> I get an IndexOutOfBoundsException when using the EntityImport.
> The problem occurs while having a resemblance of an url in the data.
> For example '
> screenPath="component://project/widget/project/ContentScreens.xml#main-page-template"'
>  is interpreted as url because of '://' but doesn't match a valid url 
> pattern. 
> The problem seems to be directly connected to Issue 12249. I think the used 
> pattern in UtilHttp.exctractUrl() should at least be configureable like the 
> customSafePolicy. [~jleroux] maybe you can have a look since you implemented 
> the changes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to