[SOLVED] Upon Checkout, TCPDF ERROR: The XObject Template '-1' doesn't exist!

Started by kden, June 09, 2015, 20:21:02 PM

Previous topic - Next topic

kden

Hello.
VM 3.0.8
Joomla 3.4.1

I have a live site that was moved to a new domain this week. Upon testing the checkout process, I get through and the credit card is charged but no order is created, we simply get the error
TCPDF ERROR: The XObject Template '-1' doesn't exist!

Now I've seen a few other posts for this and I tried to reinstall the AIO component as mentioned in one, that did not make a difference.
I didn't want to try changing the code mentioned here until I got more input. They did not give their virtuemart version and I wasn't sure if there was a change in updates.
https://forum.virtuemart.net/index.php?topic=130074.0

I also see in the virtuemart zip file to upload there is a com_tcpdf_1.0.0.zip , should that be uploaded? The VM directions only state to upload the other 2 zipped files. Please let me know if the answer is that code change or another.
This has been a frustrating process and I don't know what the answer is.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

kden

No go.

I updated to 3.0.9 and reinstalled the aio for 3.0.9 and got the same error. I cleared my cache, went in and changed the code on line 337 of vmpdf.php to say $this->header_xobjid = false; instead of -1.
Cleared cache, waited, cleared again, checked, still that same error. TCPDF ERROR: The XObject Template '-1' doesn't exist!


Went in and changed this per previous post:
In: /components/com_virtuemart/helpers/vmpdf.php on line 252:
replace:
if ($this->header_xobjid === false) {
with:
if ($this->header_xobjid < 0)

cleared cache, wait, checkout,
TCPDF ERROR: [Image] Unable to get image: /home/a1secu6/public_html/sternmastermarine.com/libraries/tcpdf/cache/img_dd5d02cc750d2855cf6f6c5bf5bea587
Now, after this second change I am able to view a preview of the invoice through Shop/Invoices&Email (could not before) but again the order does not go through with virtuemart but the credit card is charged. EDIT: The order is showing up on the backend, but I am not getting the email sent to the vendor confirming an order.

I have no idea what that image is supposed to be, there is nothing in that cache folder except index.html

Please tell me you can help or do you know anybody who fixes this kind of thing.


kden

After updating the com_tcpdf_1.0.0 through the extension manager I get a new error (I kept all the prior code edits and also added shipping and payment logos thinking that might be the cause of the image issue)

New Error: TCPDF ERROR: The XObject Template '' doesn't exist!

To reconfirm what is happening, When I checkout I hit place order and get the error screen. There is no email sent out to the administrator or customer but the card is charged. In the backend of joomla I can see the order. When I change the order status to shipped it will send out the regular email, but then i change it back to confirmed it is the error TCPDF ERROR: The XObject Template '' doesn't exist!

Should I change back the codes I messed with or is there another answer?

kden

Solved:

After getting no response, I decided to undo both code edits I did previously. Once I did that, I got a new error, TCPDF ERROR: [Image] Unable to get the size of the image:
I searched for the solution to that problem and found this post http://forum.virtuemart.net/index.php?topic=128538.0

Putting in the edit as proposed by Tonimito fixed my problem, the old orders were not fixed but any new orders were creating the invoices and sending out the emails as should be.

Thanks to Milbo for his time

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/