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 7e4a4519bf Fixed: getBlogEntry() only returns templateDataResourceId 
for posts with an image (OFBIZ-13624)
7e4a4519bf is described below

commit 7e4a4519bff1e2c808446c0c04a08ccc831ef2fe
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 29 20:03:34 2026 +0530

    Fixed: getBlogEntry() only returns templateDataResourceId for posts with an 
image (OFBIZ-13624)
    
    templateDataResourceId was gated behind an image-presence check, but the 
servicedef declares it as an unconditional OUT attribute, and 
updateBlogEntry()'s change-detection depends on it always being present. Every 
edit of a text-only blog post silently reverted its stored template selection, 
since the missing field made the update path always treat the template as 
changed.
---
 .../src/main/groovy/org/apache/ofbiz/content/BlogServices.groovy      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/BlogServices.groovy
 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/BlogServices.groovy
index b52bb000cd..90ad1e37dd 100644
--- 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/BlogServices.groovy
+++ 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/BlogServices.groovy
@@ -131,9 +131,9 @@ Map getBlogEntry() {
                      contentId: content.contentId,
                      contentName: content.contentName,
                      description: content.description,
-                     statusId: content.statusId]
+                     statusId: content.statusId,
+                     templateDataResourceId: content.dataResourceId]
     if (imageContent) {
-        resultMap.templateDataResourceId = content.dataResourceId
         resultMap.imageContentId = imageContent.contentId
         resultMap.imageDataResourceId = imageContent.dataResourceId
     }

Reply via email to