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
""
VM3 is released.....
Just updated. Same thing.
Same thing here.
Just building from scratch with VM3.
"No fonts _specs.xml files found in....."
It is a false positiv. You can ignore it.
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
(http://foto.kolibru.ru/images/2014/12/02/2014-12-02_1-48-50.jpg)
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
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
to Christopher
Thanks, you real help
+ woot in karma :)
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
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.
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.
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é
If your version of VirtueMart still needs the the _specs.xml files, you can download them here: http://dev.virtuemart.net/projects/virtuemart/repository/show/trunk/virtuemart/libraries/tcpdf/fonts