This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new d611864a4d Fixed: setPortalPortletAttributes doesn't clean up blank
attribute values (OFBIZ-13588)
d611864a4d is described below
commit d611864a4d742dca21004d66c80754219092b332
Author: Mridul Pathak <[email protected]>
AuthorDate: Wed Sep 16 16:46:41 2026 +0530
Fixed: setPortalPortletAttributes doesn't clean up blank attribute values
(OFBIZ-13588)
The Groovy conversion of setPortalPortletAttributes deletes and recreates
every submitted PortletAttribute, but unlike the original minilang it no longer
skips attributes whose incoming value is blank, so clearing an attribute's
value in the UI left a PortletAttribute row with an empty attrValue instead of
removing it.
---
.../src/main/groovy/org/apache/ofbiz/common/PortalPageMethods.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/framework/common/src/main/groovy/org/apache/ofbiz/common/PortalPageMethods.groovy
b/framework/common/src/main/groovy/org/apache/ofbiz/common/PortalPageMethods.groovy
index 94098b436c..db7f47f297 100644
---
a/framework/common/src/main/groovy/org/apache/ofbiz/common/PortalPageMethods.groovy
+++
b/framework/common/src/main/groovy/org/apache/ofbiz/common/PortalPageMethods.groovy
@@ -45,7 +45,7 @@ String setPortalPortletAttributes() {
portletSeqId:
parameters.portletSeqId])
List skipField = ['portalPageId', 'portalPortletId', 'portletSeqId']
parameters.each {
- if (skipField.contains(it.key)) {
+ if (skipField.contains(it.key) || !it.value) {
return
}
GenericValue porletAttr = from('PortletAttribute')