Login  Register

Users - RESOLVED: Error creating PDF of Order

Posted by Mark Mantarro on Jan 08, 2006; 7:39pm
URL: http://ofbiz.116.s1.nabble.com/Users-RESOLVED-Error-creating-PDF-of-Order-tp136874.html

OK,

I’m still pretty new to this product, but I was able to resolve this error.  Now I need to know if I should report this (and how) and how many other problems did I just uncover?

 

RESOLUTION: discovered \applications\order\webapp\ordermgr\WEB-INF\actions\order\companyHeader.bsh has partyId = “Company” hardcoded on line 43!  I changed line to partyId = “10000” (my real company) and I was able to render the PDF.

 

How many other things assume partyId = “Company”? Is this a bug? Should this be a role?  Anyway, I don’t know how to proceed, except to change this every time I update my SVN version.

 

Background: When I installed my “production” OFBIZ , I did a ant run-install-seed to just get the minimum data in the system.  I then added my company and the necessary roles, etc….  Unfortunately, that means that my company is not Party ID of “Company”…. Any suggestions, I’ve got 6 months of data in the system now and can’t just “start over”.

 

Mark

 


From: Mark Mantarro [mailto:[hidden email]]
Sent: Sunday, January 08, 2006 9:25 AM
To: '[hidden email]'
Subject: RE: Error creating PDF of Order

 

 

Sorry for taking so long to reply, Thanks for your comments…  but I still don’t have the answer.

 

I downloaded and tested with the demo data and the PDF rendering works, so the code is good.  So it must be something in the upgrade.  When I re-read the change comments, I am still stuck on the comment: : it will now retrieve company information and logo from the database settings”

 

What database settings?  Where do I set them in the app?  Does my party or facility need a specific role or contactmech that is new?  I had modified the companyLogo.fo.ftl file to have my logo and return address.  Obviously , this will now come from the database.  Also, I found these error messages in the log concerning data/entity issues:

 

E:/Downloads/ofbiz/svncode/ofbiz_6473/specialized/wholesale/entitydef/entitymodel.xml

22593 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity PartyRoleAndPartyDetail because one already exists with the name: statusId

22723 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: facilityId

22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: facilityId

22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: comments

22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity PartyRelationshipAndType because one already exists with the name: statusId

22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: externalId

22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: statusId

22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: comments

 


From: Mark Mantarro [mailto:[hidden email]]
Sent: Thursday, December 29, 2005 11:58 PM
To: '[hidden email]'
Subject: Error creating PDF of Order

 

Hello,

 

I’ve been running on r5664, but am looking to move up to the newest version.  I updated to r6418 and then r6445 but I can not get the PDF option to render when viewing an order.  From the error message it looks like an improvement in r6108 “New and improved company header for order receipts and other PDFs: it will now retrieve company information and logo from the database settings.” is the culprit.  

 

How do I check and correct my company info and logo in the database?  Is that really the problem?

 

Here is the log excerpt.  Can’t wait to understand this better so I can contribute….

 

Mark M

 

 

Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.

The problematic instruction:

----------

==> ${postalAddress.address1?if_exists} [on line 13, column 29 in companyHeader.fo.ftl]

----------

 

Java backtrace for programmers:

----------

freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.

 

 

Exception: org.ofbiz.base.util.GeneralException

Message: Error rendering screen [CompanyLogo]: java.lang.RuntimeException: Error rendering included template at location [component://order/webapp/ordermgr/order/companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl. (Error rendering included template at location [component://order/webapp/ordermgr/order/companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.)


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users