VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: man.of.earth on April 23, 2022, 04:42:26 AM

Title: [for the devs] TCPDF fixes
Post by: man.of.earth on April 23, 2022, 04:42:26 AM
Hello devs,

I fixed the paths for /administrator/components/com_tcpdf/tcpdf.php, and left the former lines preceded by # (commented).

lines 111 to 121:

require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php');#require_once(dirname(__FILE__).'/tcpdf_autoconfig.php');
// TCPDF static font methods and data
require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/include/tcpdf_font_data.php');#require_once(dirname(__FILE__).'/include/tcpdf_font_data.php');
// TCPDF static font methods and data
require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php');#require_once(dirname(__FILE__).'/include/tcpdf_fonts.php');
// TCPDF static color methods and data
require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/include/tcpdf_colors.php');#require_once(dirname(__FILE__).'/include/tcpdf_colors.php');
// TCPDF static image methods and data
require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/include/tcpdf_images.php');#require_once(dirname(__FILE__).'/include/tcpdf_images.php');
// TCPDF static methods and data
require_once(JPATH_ROOT.'/libraries/vendor/tecnickcom/tcpdf/include/tcpdf_static.php');echo '<h3>This component is meant to be so<h3>';#require_once(dirname(__FILE__).'/include/tcpdf_static.php');


It also throws a few PHP deprecation messages.
Title: Re: [for the devs] TCPDF fixes
Post by: Milbo on April 28, 2022, 22:00:21 PM
require_once(dirname(__FILE__)

What is the problem with it, do you use PHP8?
Title: Re: [for the devs] TCPDF fixes
Post by: man.of.earth on April 29, 2022, 21:37:11 PM
No, just PHP 7.4.
Displaying that page produced a lot of errors.
Title: Re: [for the devs] TCPDF fixes
Post by: Milbo on April 30, 2022, 22:57:02 PM
Hmmm, do you have the same problem with the last version? I just need to ask, because there ar ereally a lot people with no problems.
Title: Re: [for the devs] TCPDF fixes
Post by: man.of.earth on May 02, 2022, 09:53:04 AM
Great! I saw the last version is updated to 1.2.2 and produces no errors.
It does even display some text:

Message
TCPDF installed and available

Version: 1.2.2 of November 2020
TCPDF 6.2.26 by Nicola Asuni. Joomla Installer by the VirtueMart Team and updated for php7.4
Authors: Nicola Asuni, The VirtueMart Development Team https://virtuemart.net
Copyright (c) 2001-2018 Nicola Asuni - Tecnick.com LTD - Tutti i diritti riservati - All Rights Reserved. 2015 - 2022 Virtuemart Team. All rights reserved.
License: http://www.gnu.org/licenses/lgpl-3.0.html GNU/GPL
Title: Re: [for the devs] TCPDF fixes
Post by: Milbo on May 02, 2022, 12:00:07 PM
Yes, I also fixed that one, it was a silly stupid error not displaying this page.