You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/29 16:26:00 UTC
[jira] [Commented] (OFBIZ-13625) uploadProductImages() silently drops every image after the first populated slot on a multi-image upload
[ https://issues.apache.org/jira/browse/OFBIZ-13625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120818#comment-18120818 ]
ASF subversion and git services commented on OFBIZ-13625:
---------------------------------------------------------
Commit 5b28f0c68e94f1f7e23670bb9a61732a63c01481 in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=5b28f0c68e ]
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.
> uploadProductImages() silently drops every image after the first populated slot on a multi-image upload
> -------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-13625
> URL: https://issues.apache.org/jira/browse/OFBIZ-13625
> Project: OFBiz
> Issue Type: Bug
> Components: product/catalog
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
>
> {{Map addAdditionalViewForProductMap = parameters}} is a reference, not a copy. Once the first populated slot's block calls {{.clear()}}, it clears {{parameters}} itself, so every later {{if (parameters._additionalImageTwo_fileName)}} (through Ten) reads a cleared map and is skipped. Present since the original 2021 conversion. Fix: give the map its own fresh copy per slot instead of aliasing {{parameters}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)