News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

(2.9.9.5) No fonts _specs.xml files found warning

Started by Gouz, November 21, 2014, 16:04:28 PM

Previous topic - Next topic

Gouz

After upgrading 2.9.9.4 to 2.9.9.5 i get the following warning in SHOP tab.

""
Warning
No fonts _specs.xml files found in ..../libraries/tcpdf/fonts
""

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Gouz


Troels_E

Same thing here.
Just building from scratch with VM3.

"No fonts _specs.xml files found in....."

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/

Snake 60

Quote from: Milbo on November 23, 2014, 11:45:08 AM
It is a false positiv. You can ignore it.
How I can ignore it if I can't set any fonts for invoices???
Joomla 3.3.6+Virtuemart 3.0.0

Christopher

I have the same problem using J3.3.6 / vm3.0.0

I have checked the source code and find only one reference, in the file "administrator/components/com_virtuemart/models/config.php" around line 129 :

/**
* Retrieve a list of available fonts to be used with PDF Invoice generation & PDF Product view on FE
*
* @author Nikos Zagas
* @return object List of available fonts
*/
function getTCPDFFontsList() {

$dir = VMPATH_ROOT.DS.'libraries'.DS.'tcpdf'.DS.'fonts';
$result = array();
if(function_exists('glob')){
$specfiles = glob($dir.DS."*_specs.xml");
foreach ($specfiles as $file) {
$fontxml = @simpleXML_load_file($file);
if ($fontxml) {
if (file_exists($dir . DS . $fontxml->filename . '.php')) {
$result[] = JHtml::_('select.option', $fontxml->filename, vmText::_($fontxml->fontname.' ('.$fontxml->fonttype.')'));
} else {
vmError ('A font master file is missing: ' . $dir . DS . $fontxml->filename . '.php');
}
} else {
vmError ('Wrong structure in font XML file: '. $dir . DS . $file);
}
}
}

return $result;
}


I am not a great PHP programmer but a quick check of vm 2.6.x code and I found the following more extensive code, in the same file and location, around line 111 :

/**
* Retrieve a list of available fonts to be used with PDF Invoice generation & PDF Product view on FE
*
* @author Nikos Zagas
* @return object List of available fonts
*/
function getTCPDFFontsList() {

$dir = JPATH_ROOT.DS.'libraries'.DS.'tcpdf'.DS.'fonts';
$result = array();
if(function_exists('glob')){
$specfiles = glob($dir.DS."*_specs.xml");
} else {
$specfiles = array();
$manual = array('courier_specs.xml','freemono_specs.xml','helvetica_specs.xml');
foreach($manual as $file){
if(file_exists($dir.DS.$file)){
$specfiles[] = $dir.DS.$file;
}
}
}
foreach ($specfiles as $file) {
$fontxml = @simpleXML_load_file($file);
if ($fontxml) {
if (file_exists($dir . DS . $fontxml->filename . '.php')) {
$result[] = JHTML::_('select.option', $fontxml->filename, JText::_($fontxml->fontname.' ('.$fontxml->fonttype.')'));
} else {
vmError ('A font master file is missing: ' . $dir . DS . $fontxml->filename . '.php');
}
} else {
vmError ('Wrong structure in font XML file: '. $dir . DS . $file);
}
}

return $result;
}


... Is there something missing with the code for vm 3.0 ?

Can we cut-and-paste this code from 2.6.x to 3.0.0 ?

Thanks in advance
There are 10 types of people in the world:
Those who understand binary and those who don't

Christopher

After a bit more digging, I think I have found a solution...

I checked a backed up vm2.6.x site and looked in this folder:

[site root]/libraries/tcpdf/fonts

... where I found a bunch of "[fontname]_specs.xml" files for various fonts - five files in all, so I nailed these up to the same folder ( [site root]/libraries/tcpdf/fonts ) in my vm3.0.0 installation and (fingers crossed) it appears to have solved the problem.

I also found a repository of the XML files and other ways to solve the problem here:

https://codereview.appspot.com/8092047/

... I hope this helps
There are 10 types of people in the world:
Those who understand binary and those who don't

Snake 60

to Christopher
Thanks, you real help
+ woot in karma :)

Christopher

No problem Snake 60 - glad I could help.

Perhaps if we can get a heads up from Milbo on whether this is a good fix (or whether there are missing file or code from the release of vm 2.9 and vm3.0) then we can flag this as solved
There are 10 types of people in the world:
Those who understand binary and those who don't

Troels_E

#10
Thanks for the link!

I'm no developer and only my logic tells me what this or that code do, so it was a bit difficult to understand why it should be a false positive, since it was clearly not working.

EDIT: Would be nice to get a confirmation about whether this is the actual bug and a straightforward way to fix it (I'm not sure what to do with the files linked above). Or just a word of whether it is fixed in next update.

Milbo

It is fixed in the matter, that if there are no spec files are found, it takes a fallback. Thank you for the hint, that the spec files are in vm2.6, I think zakos added them a year ago.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

NETsystem.tv

Hello, i'm a new user in the forum.

Joomla 3, VM3.

I have this bug:(Error).
Attenzione
No fonts _specs.xml files found in /web/htdocs/www.taorvica.it/home/libraries/tcpdf/fonts

How can fix this problem?,
thanks you, very much,

Best Regards from Italy
René

jjk

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations