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 b365f9db8988bc5ac4d1d6db7bfd53ee32b7d612 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Thu Jul 4 11:07:34 2024 +0200 Reverted: "Fixed: Trunk demo errors in error.log (OFBIZ-13005)" This reverts commit 6b2111cfe098196ac08d4c7959956babaa2fefa9 and push instead what I think is the real solution. I was too fast last time and I missed that because of the line keywords.add(contentWrapper.get('PRODUCT_NAME', 'html')) keywords is never empty. So it's rather context.metaKeywords that may not exist. --- .../org/apache/ofbiz/order/entry/catalog/Product.groovy | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 f455e344df..655e81f54d 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 @@ -20,12 +20,12 @@ package org.apache.ofbiz.order.entry.catalog import org.apache.ofbiz.base.util.StringUtil import org.apache.ofbiz.base.util.UtilHttp +import org.apache.ofbiz.entity.util.EntityUtil import org.apache.ofbiz.product.catalog.CatalogWorker -import org.apache.ofbiz.product.category.CategoryWorker import org.apache.ofbiz.product.category.CategoryContentWrapper -import org.apache.ofbiz.product.product.ProductWorker +import org.apache.ofbiz.product.category.CategoryWorker import org.apache.ofbiz.product.product.ProductContentWrapper -import org.apache.ofbiz.entity.util.EntityUtil +import org.apache.ofbiz.product.product.ProductWorker contentPathPrefix = CatalogWorker.getContentPathPrefix(request) catalogName = CatalogWorker.getCatalogName(request) @@ -122,7 +122,11 @@ if (productId) { } } } - context.metaKeywords = StringUtil.join(keywords, ', ') + if (!context.metaKeywords) { + context.put('metaKeywords', StringUtil.join(keywords, ', ')) + } else { + context.metaKeywords = StringUtil.join(keywords, ', ') + } } // Set the default template for aggregated product (product component configurator ui)