VirtueMart Forum

VirtueMart 2 + 3 => Administration & Configuration => Topic started by: Mooncastyre on October 08, 2018, 08:27:26 am

Title: TCPDF Error
Post by: Mooncastyre on October 08, 2018, 08:27:26 am
Hello!

I am building a Virtuemart site on a new install.  I am setting up the beginning configuration and shop settings.

I am at the Invoices/Emails tab under SHOP>Shop trying to get my invoices configured and previewed.  I click on the preview page ("Here you can configure the look of invoices, delivery notes etc. You can take a look at a preview page (after saving the changes) HERE.")

This gives me a TCPDF error:

vmError: vmPdf: For the pdf, you must install the tcpdf library at /home/sassafrasmoon/public_html/libraries/tcpdf

I installed TCPDF with Virtuemart.  But just to be sure, I also extracted the Virtuemart installer and installed the file com_tcpdf_1.0.5.zip in my Joomla backend.  I'm getting the confirmation that TCPDF is installed.  But I'm still receiving the error.  I double checked my components list, and TCPDF is indeed installed.

Any idea why I would be receiving this error and how I can fix it?

Joomla Version:  3.8.12
Virtuemart Version:  3.4.1
PHP Version:  5.6.38

I am using a Joomlashine template called JSN Kido 2, which features Virtuemart styling.

My site is not yet live, but is currently being built at sassafrasmoon.com
Title: Re: TCPDF Error
Post by: GJC Web Design on October 08, 2018, 10:34:01 am
you could try rerunning the std VM TCP installer from here: 

http://dev.virtuemart.net/projects/tcpdf/files

http://dev.virtuemart.net/attachments/download/1137/com_tcpdf_1.0.5.zip
Title: Re: TCPDF Error
Post by: Milbo on October 08, 2018, 11:48:49 am
Hmm
Code: [Select]
public function samplePDF() {
if(!class_exists('VmVendorPDF')){
vmError('vmPdf: For the pdf, you must install the tcpdf library at '.VMPATH_LIBS.'/tcpdf');
return 0;
}

$pdf = new VmVendorPDF();
$pdf->AddPage();
$pdf->PrintContents(vmText::_('COM_VIRTUEMART_PDF_SAMPLEPAGE'));
$pdf->Output("vminvoice_sample.pdf", 'I');
JFactory::getApplication()->close();
}
I must admit, I did not update this function, i thought it is deprecated. It checks for a wrong path
Title: Re: TCPDF Error
Post by: Mooncastyre on October 09, 2018, 06:34:58 am
I must admit, I did not update this function, i thought it is deprecated. It checks for a wrong path

Thank you for the quick reply!  Will there be a fix released soon?
Title: Re: TCPDF Error
Post by: caesarsk on October 18, 2018, 15:39:37 pm
is it solved in version 3.4.2? is there a solution for version 3.2.14?

//edit
This error appeared after updating TCPDF on VM v3.2.14. The /libraries/tcpdf folder also disappeared (therefore, VM can not find this folder).
Title: Re: TCPDF Error
Post by: GJC Web Design on October 18, 2018, 17:08:29 pm
I  have no such problems on my sites -- VM3.4.2

u can always simply install the tcp directly

http://dev.virtuemart.net/attachments/download/1137/com_tcpdf_1.0.5.zip
Title: Re: TCPDF Error
Post by: caesarsk on October 18, 2018, 17:58:18 pm
yes, but...

I do not know what version was originally installed on my the system (VM3.2.14). J! update offered me an update TCPDF, so I updated. Immediately afterwards it proved this error. the first thing I thought was to go back to the previous version of TCPDF from VM3.2.14. Unfortunately, the error remained.
Title: Re: TCPDF Error
Post by: GJC Web Design on October 18, 2018, 18:54:32 pm
lost me -- just update to all most recent stable -- tcp vm 5 - vm3.4.2
Title: Re: TCPDF Error
Post by: caesarsk on October 18, 2018, 19:04:24 pm
advice from you is nice, but updating VM for me means a lot of work.
Title: Re: TCPDF Error
Post by: GJC Web Design on October 18, 2018, 23:15:53 pm
um - why?

for all my sites I maintain an up to date clone .. and test upgrades on that -
Title: Re: TCPDF Error
Post by: caesarsk on October 19, 2018, 10:06:50 am
big shop, own extensions, a few core hack hits.

but, after update to v3.4.2 it is solved
Title: Re: TCPDF Error
Post by: Milbo on October 22, 2018, 00:13:20 am
 ::) definitly the right decision. and nice that the fix worked. and as you read already here http://forum.virtuemart.net/index.php?topic=141282.0 you can override core function and keep them when you update. But it is still dangerous. you should always compare the new file to the old, even if anything is still running.
Title: Re: TCPDF Error
Post by: netfactory on November 06, 2018, 13:25:03 pm
joomla 3.9 VM3.4.2

vmError: vmPdf: For the pdf, you must install the tcpdf library
i install the tcpdf (com_virtuemart.3.4.2.9966_package_or_extract.zip)
Title: Re: TCPDF Error
Post by: GJC Web Design on November 06, 2018, 14:10:48 pm
If that is from clicking the "preview invoice" link in the admin invoice tab afaik this is broken  ( so ignore) ..
Title: Re: TCPDF Error
Post by: Milbo on November 08, 2018, 13:05:02 pm
Should be fixed in the vm3.4.3
Title: Re: TCPDF Error
Post by: Mooncastyre on November 14, 2018, 16:50:17 pm
Should be fixed in the vm3.4.3

That's great to hear!  Thank you!!!
Title: Re: TCPDF Error
Post by: Milbo on November 16, 2018, 10:14:00 am
Please test it http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: TCPDF Error
Post by: diri on November 17, 2018, 07:53:13 am
Hi Milbo,

sorry but there is no preview of the bill. Normal Joomla page with blank content area is shown.

No error message.

cu, diri
Title: Re: TCPDF Error
Post by: Mooncastyre on November 20, 2018, 11:49:20 am
Sorry, Milbo, I'm getting the same error.  I even went back and did a fresh install with Joomla 3.9 and VM 3.4.2.  I just installed VM 3.4.3.9989 and am getting this:

Code: [Select]
vmError: vmPdf: For the pdf, you must install the tcpdf library at {root}/html/libraries/tcpdf
Title: Re: TCPDF Error
Post by: delroy on November 22, 2018, 14:23:32 pm
Hi Milbo, sorry same here, joomla 3.9, VM 3.4.3.9989 , php7.2, no error message and no pdf in backend preview, just a blank screen. Also in the front end after preview invoice and select pdf preview, this comes up..... 0 - Class 'vmDefines' not found
You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.

thanks
delroy
Title: Re: TCPDF Error
Post by: jjk on November 22, 2018, 21:22:33 pm
Code: [Select]
vmError: vmPdf: For the pdf, you must install the tcpdf library at {root}/html/libraries/tcpdf

Did you eventually forget to install the com_tcpdf_1.0.5.zip included in the com_virtuemart.3.4.3.9989_package_or_extract.zip?
Title: Re: TCPDF Error
Post by: Jörgen on November 23, 2018, 07:36:32 am
Strange error message:
Quote
vmError: vmPdf: For the pdf, you must install the tcpdf library at {root}/html/libraries/tcpdf

The correct url should be:
Code: [Select]
libraries/vendor/tecnickcom/tcpdf
If VM expects TCPDF to be located at '{root}/html/libraries/tcpdf' then it surely does not help to install it at the correct location. But You can always try.

Jörgen @ Kreativ Fotografi
Title: Re: TCPDF Error
Post by: GJC Web Design on November 23, 2018, 10:10:16 am
getting a bit circular here... there is another thread with full explanation

the error is thrown ONLY when the "test/preview" invoice button is used..  AND the error message is wrong and the view is broken
This all needs to be fixed but was over looked on this (for devs) rarely used function - or there is a case for just removing the confusing function

the function is broken but as discussed it is not a very useful view anyway .. if u want to test / preview your invoices then make a purchase and look at the invoice!!!!

Delete and adjust and re status to produce another
Title: Re: TCPDF Error
Post by: Mooncastyre on December 09, 2018, 17:13:07 pm

Did you eventually forget to install the com_tcpdf_1.0.5.zip included in the com_virtuemart.3.4.3.9989_package_or_extract.zip?

I installed it about 10 times over two different sites, including full Virtuemart installs and just com_tcpdf_1.0.5.zip, and no luck.


The correct url should be:
Code: [Select]
libraries/vendor/tecnickcom/tcpdf
If VM expects TCPDF to be located at '{root}/html/libraries/tcpdf' then it surely does not help to install it at the correct location.

^This


the error message is wrong and the view is broken
This all needs to be fixed but was over looked

^And this