This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 8026241  Fixed: Bug in HtmlFormMacroLibrary.ftl::makeHyperlinkString 
macro (OFBIZ-12468)
8026241 is described below

commit 80262418fd2b4b2b229c0a08abcaadb77bb3c6e9
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sat Dec 18 11:44:29 2021 +0100

    Fixed: Bug in HtmlFormMacroLibrary.ftl::makeHyperlinkString macro 
(OFBIZ-12468)
    
    I was unable to reproduce the error, but according to
    
https://stackoverflow.com/questions/51524640/why-does-freemarkers-built-in-is-string-return-true-for-an-object
    The solution is to check for targetParameters not being an hash
    
    Actually this was not the reason of the 1.7GB console log, another Jira to 
come
---
 themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
index b391727..de63a3f 100644
--- a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
@@ -695,7 +695,7 @@ Parameter: delegatorName, String, optional - name of the 
delegator in context.
 <#macro makeHyperlinkString hiddenFormName imgSrc title  alternate linkUrl 
description linkStyle="" event="" action="" targetParameters="" targetWindow="" 
confirmation="" uniqueItemName="" height="" width="" id="">
     <#if uniqueItemName?has_content>
         <#local params = "{&quot;presentation&quot;: &quot;layer&quot;">
-        <#if targetParameters?has_content>
+        <#if targetParameters?has_content && && !targetParameters?is_hash>
           <#local parameterMap = targetParameters?eval>
           <#local parameterKeys = parameterMap?keys>
           <#list parameterKeys as key>

Reply via email to