You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2026/02/11 12:51:48 UTC

(ofbiz-framework) branch trunk updated: Fixed: A test case in ecommerce suite was failing because of incomplete sample data. Also updating the conditional check.

This is an automated email from the ASF dual-hosted git repository.

ashish 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 3f4121d587 Fixed: A test case in ecommerce suite was failing because of incomplete sample data. Also updating the conditional check.
3f4121d587 is described below

commit 3f4121d587ce078026af04aa6e9de67d7776029d
Author: Ashish Vijaywargiya <as...@apache.org>
AuthorDate: Wed Feb 11 18:20:35 2026 +0530

    Fixed: A test case in ecommerce suite was failing because of incomplete sample data. Also updating the conditional check.
    
    Following message was returning on the console:
    assert ServiceUtil.isSuccess(serviceResult) | | false ['errorMessage':'Error rendering PDF attachment for email: org.apache.fop.apps.FOPException: net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 118; columnNumber: 174; The content of elements must consist of well-formed character data or markup.\nnet.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 118; columnNumber: 174; The content of elements must consist of well-formed charact [...]
---
 applications/order/template/order/OrderReportContactMechs.fo.ftl | 5 ++++-
 applications/order/testdef/data/OrderTestData.xml                | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/applications/order/template/order/OrderReportContactMechs.fo.ftl b/applications/order/template/order/OrderReportContactMechs.fo.ftl
index 988712cbe6..743e59c22e 100644
--- a/applications/order/template/order/OrderReportContactMechs.fo.ftl
+++ b/applications/order/template/order/OrderReportContactMechs.fo.ftl
@@ -85,7 +85,10 @@ under the License.
                 <#assign creditCard = orderPaymentPreference.getRelatedOne("PaymentMethod", false).getRelatedOne("CreditCard", false)>
                 ${Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)}
             <#else>
-                ${paymentMethodType.get("description",locale)!}
+                <#if paymentMethodType?has_content>
+                    ${paymentMethodType.get("description",locale)!}
+                </#if>
+            </#else>
             </#if>
         </fo:block>
     </#list>
diff --git a/applications/order/testdef/data/OrderTestData.xml b/applications/order/testdef/data/OrderTestData.xml
index f9519e00d3..3e3d599198 100644
--- a/applications/order/testdef/data/OrderTestData.xml
+++ b/applications/order/testdef/data/OrderTestData.xml
@@ -73,7 +73,7 @@ under the License.
     <Invoice invoiceId="TEST_DEMO10090" partyId="TestDemoCustomer" partyIdFrom="Company" invoiceDate="2009-08-17 14:56:44.573" statusId="INVOICE_PAID" currencyUom="USD"/>
     <InvoiceItem invoiceId="TEST_DEMO10090" invoiceItemSeqId="00001" invoiceItemTypeId="PINV_FPROD_ITEM" productId="GZ-2644" quantity="2.000000" amount="38.40" description="GZ-2644-0 Round Gizmo"/>
     <OrderItemBilling orderId="TEST_DEMO10090" orderItemSeqId="00001" invoiceId="TEST_DEMO10090" invoiceItemSeqId="00001" quantity="2.000000" amount="38.40"/>
-    <OrderPaymentPreference orderPaymentPreferenceId="TEST_DEMO10090" orderId="TEST_DEMO10090" maxAmount="76.80" statusId="PAYMENT_SETTLED" createdDate="2009-08-17 14:56:44.573"/>
+    <OrderPaymentPreference orderPaymentPreferenceId="TEST_DEMO10090" orderId="TEST_DEMO10090" paymentMethodTypeId="EFT_ACCOUNT" maxAmount="76.80" statusId="PAYMENT_SETTLED" createdDate="2009-08-17 14:56:44.573"/>
     <Payment paymentId="1014" paymentTypeId="CUSTOMER_PAYMENT" paymentPreferenceId="TEST_DEMO10090" paymentMethodTypeId="EFT_ACCOUNT" partyIdFrom="TestDemoCustomer" partyIdTo="Company" statusId="PMNT_RECEIVED" effectiveDate="2006-04-25 12:56:54.292" amount="76.80" currencyUomId="USD"/>
 
 </entity-engine-xml>