You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/06/15 20:11:57 UTC
svn commit: r1748628 -
/ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl
Author: jleroux
Date: Wed Jun 15 20:11:57 2016
New Revision: 1748628
URL: http://svn.apache.org/viewvc?rev=1748628&view=rev
Log:
A patch from Arvind Singh Tomar for "Inventory report throws an error" https://issues.apache.org/jira/browse/OFBIZ-6947 reported by Pierre Smits
When executing the print pdf function in https://demo-trunk-ofbiz.apache.org/facility/control/ViewFacilityInventoryByProduct
the following error is thrown:
Unable to transform FO file: org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: null:80:115: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (See position 80:115) javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: null:80:115: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (See position 80:115)
The issue was due to missing child element which is failing on validation. Earlier we were using fop-1.1.jar and now it is updated to fop-2.0.jar which by default validates the markup. It is same as OFBIZ-7090
I have added the missing child elements in the macro which were causing the validation to fail and providing the updated patch.
Modified:
ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl
Modified: ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl?rev=1748628&r1=1748627&r2=1748628&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/FoFormMacroLibrary.ftl Wed Jun 15 20:11:57 2016
@@ -103,8 +103,8 @@ under the License.
<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle><fo:table-row <@getFoStyle "${altRowStyles}"/>></#macro>
<#macro renderFormatItemRowClose formName></fo:table-row></#macro>
-<#macro renderFormatItemRowCellOpen fieldName style positionSpan><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle style/><#else><@getFoStyle "tabletext"/></#if>></#macro>
-<#macro renderFormatItemRowCellClose fieldName></fo:table-cell></#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle style/><#else><@getFoStyle "tabletext"/></#if>><fo:block></#macro>
+<#macro renderFormatItemRowCellClose fieldName></fo:block></fo:table-cell></#macro>
<#macro renderFormatItemRowFormCellOpen style></#macro>
<#macro renderFormatItemRowFormCellClose></#macro>
@@ -116,8 +116,8 @@ under the License.
<#macro renderFormatFieldRowTitleCellOpen style><fo:table-cell font-weight="bold" text-align="right" padding="3pt"><fo:block></#macro>
<#macro renderFormatFieldRowTitleCellClose></fo:block></fo:table-cell></#macro>
<#macro renderFormatFieldRowSpacerCell></#macro>
-<#macro renderFormatFieldRowWidgetCellOpen positionSpan style><fo:table-cell text-align="left" padding="2pt" padding-left="5pt" <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if>></#macro>
-<#macro renderFormatFieldRowWidgetCellClose></fo:table-cell></#macro>
+<#macro renderFormatFieldRowWidgetCellOpen positionSpan style><fo:table-cell text-align="left" padding="2pt" padding-left="5pt" <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if>><fo:block></#macro>
+<#macro renderFormatFieldRowWidgetCellClose></fo:block></fo:table-cell></#macro>
<#macro renderFormatEmptySpace> <@makeBlock "" " " /><!--space--></#macro>