dixitdeepak commented on a change in pull request #252:
URL: https://github.com/apache/ofbiz-framework/pull/252#discussion_r560712502



##########
File path: applications/order/groovyScripts/order/CompanyHeader.groovy
##########
@@ -135,12 +136,22 @@ if (!partyId) {
 }
 
 // the logo
-partyGroup = from("PartyGroup").where("partyId", partyId).queryOne()
+GenericValue partyGroup = from("PartyGroup").where("partyId", 
partyId).queryOne()
 if (partyGroup) {
-    partyContentWrapper = new PartyContentWrapper(dispatcher, partyGroup, 
locale, EntityUtilProperties.getPropertyValue("content", "defaultMimeType", 
"text/html; charset=utf-8", delegator))
-    partyContent = 
partyContentWrapper.getFirstPartyContentByType(partyGroup.partyId , partyGroup, 
"LGOIMGURL", delegator)
+    GenericValue partyContent = 
PartyContentWrapper.getFirstPartyContentByType(partyId, partyGroup, 
"LGOIMGURL", delegator)

Review comment:
       After debugging code it fails to return object info due the check at 
DataResourceWorker.writeDataResourceText method
   
https://github.com/apache/ofbiz-framework/blob/trunk/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java#L927
   
   `            if (dataResourceMimeTypeId == null || 
dataResourceMimeTypeId.startsWith("text")) {`
   
   If we delete the dataResourceMimeTypeId field from DataResource, it will 
work 
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to