svn commit: r1865852 - /ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1865852 - /ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl

Pawan Verma-2
Author: pawan
Date: Sat Aug 24 14:28:57 2019
New Revision: 1865852

URL: http://svn.apache.org/viewvc?rev=1865852&view=rev
Log:
Fixed: Issue of unable to view a PartyContent on view profile page of a party
(OFBIZ-11038)

When click on view button img request will be hit along with contentName and imgId as a parameter. This request invokes serveImage event(DataEvents.java) which is deprecated now.
Instead of img request we can call stream request with contentId as a parameter that invokes serveObjectData event.
This will work as per the value of content-disposition-type (requestHandler.properties) i.e. attachement or inline

Thanks: Devanshu Vyas for reporting the issue and Humera Khan for the patch and Prachi Shastri for testing of the bug.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl

Modified: ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl?rev=1865852&r1=1865851&r2=1865852&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/ContentList.ftl Sat Aug 24 14:28:57 2019
@@ -36,7 +36,7 @@ under the License.
               <td>${pContent.fromDate!}</td>
               <td class="button-col">
                 <#if (content.contentName?has_content)>
-                    <a href="<@ofbizUrl>img/${content.contentName}?imgId=${(content.dataResourceId)!}</@ofbizUrl>" target="_blank">${uiLabelMap.CommonView}</a>
+                  <a href="<@ofbizUrl>stream?contentId=${(content.contentId)!}</@ofbizUrl>" target="_blank">${uiLabelMap.CommonView}</a>
                 </#if>
                 <form name="removePartyContent_${pContent_index}" method="post" action="<@ofbizUrl>removePartyContent/viewprofile</@ofbizUrl>">
                   <input type="hidden" name="contentId" value="${pContent.contentId}" />