This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new efea3a6c66 Fixed: setPortalPortletAttributes doesn't clean up blank
attribute values (OFBIZ-13588)
efea3a6c66 is described below
commit efea3a6c66d89696102ba140a2f2af1b68e2c3eb
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 0bdd9cdadc..cf2c4323d0 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')