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 92dd01bec9 Fixed: uploadProductImages() silently drops every image
after the first populated slot (OFBIZ-13625)
92dd01bec9 is described below
commit 92dd01bec936d6cc3ba5253760c1bd814af6b71e
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 29 20:19:07 2026 +0530
Fixed: uploadProductImages() silently drops every image after the first
populated slot (OFBIZ-13625)
Map addAdditionalViewForProductMap = parameters was a reference, not a
copy, so once the first populated slot's block called .clear(), it cleared
parameters itself. Every later if (parameters._additionalImageTwo_fileName)
(through Ten) then read a cleared map and was skipped. Present since the
original 2021 conversion. Now gives the map its own copy instead of aliasing
parameters.
---
.../product/imagemanagement/ImageManagementServicesScript.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy
index 249f77ff5c..0a6f8ed6a0 100644
---
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy
+++
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy
@@ -34,7 +34,7 @@ Map uploadProductImages() {
Map result = success()
Map serviceResult = [:]
result.productId = parameters.productId
- Map addAdditionalViewForProductMap = parameters
+ Map addAdditionalViewForProductMap = new HashMap<>(parameters)
if (parameters._additionalImageOne_fileName) {
addAdditionalViewForProductMap.productId = parameters.productId
addAdditionalViewForProductMap.imageResize = parameters.imageResize