You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2021/12/18 10:58:55 UTC

[ofbiz-framework] 02/02: Fixed: Bug in HtmlFormMacroLibrary.ftl::makeHyperlinkString macro (OFBIZ-12468)

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

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

commit 47d8fea5fde3729e54fc66b85e4a0deef57edf3b
Author: Jacques Le Roux <ja...@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 4652786..10ef79f 100644
--- a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
@@ -738,7 +738,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>