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 ed78b9aaec628afaf32fe05dc15382fff022b597
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Thu Jul 11 14:50:35 2024 +0200

    Fixed: Trunk demo errors in error.log (OFBIZ-13005)
    
    With my last commit b365f9db8988bc5ac4d1d6db7bfd53ee32b7d612 I wrote that 
with
    <<    keywords.add(contentWrapper.get('PRODUCT_NAME', 'html'))
    keywords is never empty.>>
    
    I found again the same error in trunk demo so we need to also check that
    contentWrapper contains 'html' for 'PRODUCT_NAME'. Here it is.
    
    All this comes from when moving from Minilang to Groovy, which proves that 
it
    was not an easy task.
---
 .../main/groovy/org/apache/ofbiz/order/entry/catalog/Product.groovy   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/applications/order/src/main/groovy/org/apache/ofbiz/order/entry/catalog/Product.groovy
 
b/applications/order/src/main/groovy/org/apache/ofbiz/order/entry/catalog/Product.groovy
index 655e81f54d..da2ef01c0e 100644
--- 
a/applications/order/src/main/groovy/org/apache/ofbiz/order/entry/catalog/Product.groovy
+++ 
b/applications/order/src/main/groovy/org/apache/ofbiz/order/entry/catalog/Product.groovy
@@ -122,9 +122,9 @@ if (productId) {
                     }
                 }
             }
-            if (!context.metaKeywords) {
+            if (!context.metaKeywords && keywords) {
                 context.put('metaKeywords', StringUtil.join(keywords, ', '))
-            } else {
+            } else if (keywords) {
                 context.metaKeywords = StringUtil.join(keywords, ', ')
             }
         }

Reply via email to