Summary: | Setting autobarcode to <branch>yymm00001 exports blank barcode labels | ||
---|---|---|---|
Product: | Koha | Reporter: | Lennon Mazonde <lennon> |
Component: | Label/patron card printing | Assignee: | Chris Nighswonger <cnighswonger> |
Status: | CLOSED INVALID | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | bgkriegel, indradg |
Version: | 3.20 | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8375 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Sample of pdf output when autobarcode is set to "<branch>yymm00001"
Example barcode |
Description
Lennon Mazonde
2015-06-25 20:27:59 UTC
(In reply to Lennon Mazonde from comment #0) > [Thu Jun 25 15:24:52.560515 2015] [cgi:error] [pid 14148] [client > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > label-create-pdf.pl: Use of uninitialized value in -e at > /usr/share/koha/lib/C4/Creators/PDF.pm line 226., referer: > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl > [Thu Jun 25 15:24:52.560758 2015] [cgi:error] [pid 14148] [client > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > label-create-pdf.pl: ERROR in koha-conf.xml -- missing <font > type="Ft2">/path/to/font.ttf</font> at > /usr/share/koha/lib/C4/Creators/PDF.pm line 229., referer: > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl > [Thu Jun 25 15:24:52.578821 2015] [cgi:error] [pid 14148] [client > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > label-create-pdf.pl: Use of uninitialized value in -e at > /usr/share/koha/lib/C4/Creators/PDF.pm line 226., referer: > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl > [Thu Jun 25 15:24:52.579064 2015] [cgi:error] [pid 14148] [client > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > label-create-pdf.pl: ERROR in koha-conf.xml -- missing <font > type="Ft2">/path/to/font.ttf</font> at /usr/share/koha > /lib/C4/Creators/PDF.pm line 229., referer: > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl > The problem appears to be that you do not have the font configuration set correctly in your koha-conf.xml. This is evident from the lines like: ERROR in koha-conf.xml -- missing <font> type="Ft2">/path/to/font.ttf</font> You will need to set the path to match the location of the Truetype fonts on your system. This should fix the problem. If it does, please close the bug; otherwise, feel free to update with more information. > > This is my first time posting a bug, please do forgive me if i've broken any > bug writing guidelines :) This is actual a fantastic bug report! Thanks for taking time to do it right. That saves loads of time when trying to figure out just what is going on. You may read more about the TT font pathing foo here: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8375#c69 (In reply to Lennon Mazonde from comment #0) > Setting the autobarcode preference in Administration to generate barcodes in > the form "<branch>yymm00001" exports blank barcode labels in the Label > Creator (it prints out the digit/letters but not the barcode lines) > ... > [Thu Jun 25 15:24:52.560515 2015] [cgi:error] [pid 14148] [client > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > label-create-pdf.pl: Use of uninitialized value in -e at > /usr/share/koha/lib/C4/Creators/PDF.pm line 226., referer: > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl Are you using EAN13 barcodes? I think that they can only be digits, perhaps your branch code is the culprit. From PDF::Reuse::Barcode page: EAN13 Creates EAN13 barcodes from a string of 12 or 13 digits. The check number (the 13:th digit) is calculated if not supplied. If there is given check number it is not controlled. (In reply to Bernardo Gonzalez Kriegel from comment #3) > (In reply to Lennon Mazonde from comment #0) > > > Setting the autobarcode preference in Administration to generate barcodes in > > the form "<branch>yymm00001" exports blank barcode labels in the Label > > Creator (it prints out the digit/letters but not the barcode lines) > > > ... > > [Thu Jun 25 15:24:52.560515 2015] [cgi:error] [pid 14148] [client > > 197.221.240.195:38832] AH01215: [Thu Jun 25 21:24:52 2015] > > label-create-pdf.pl: Use of uninitialized value in -e at > > /usr/share/koha/lib/C4/Creators/PDF.pm line 226., referer: > > http://staffdemo.muhachabooks.com/cgi-bin/koha/labels/label-print.pl > > Are you using EAN13 barcodes? > I think that they can only be digits, perhaps your branch code is the > culprit. > > From PDF::Reuse::Barcode page: > > EAN13 > Creates EAN13 barcodes from a string of 12 or 13 digits. The check number > (the 13:th digit) is calculated if not supplied. If there is given check > number it is not controlled. Regardless, it will always die at the same point due to missing TTF paths in the configuration file. (In reply to Chris Nighswonger from comment #4) > > Regardless, it will always die at the same point due to missing TTF paths in > the configuration file. Here is the point of failure based on the log posted: http://tinyurl.com/orn9pnr The missing paths cause $ttf_path->{content} to not be initialized which causes the '-e' to bork. There really should be a more graceful error handler in play here. Of course, there may be another issue at play here as well, and that may be what Bernardo has pointed out. (In reply to Bernardo Gonzalez Kriegel from comment #3) > Are you using EAN13 barcodes? > I think that they can only be digits, perhaps your branch code is the > culprit. > Hi Bernado, No i'm using Code 39. I've tried using the other barcode types available in the label creator but the problem still persists. (In reply to Chris Nighswonger from comment #1) > > > The problem appears to be that you do not have the font configuration set > correctly in your koha-conf.xml. This is evident from the lines like: > > ERROR in koha-conf.xml -- missing <font> type="Ft2">/path/to/font.ttf</font> > > You will need to set the path to match the location of the Truetype fonts on > your system. > > This should fix the problem. If it does, please close the bug; otherwise, > feel free to update with more information. > Hi Chris, sorry for the late response. I'm assuming 'Ft2' stands for Freetype2? I don't seem to have that font installed anywhere in my directories (/usr/share/fonts/truetype/). How do i install it (noob alert, step-by-step instructions would be appreciated)? Note: As a test, i copied and renamed one of the fonts in /usr/share/fonts/truetype/ to 'Ft2.ttf' and set the path in koha-conf.xml to <font type="Ft2">/usr/share/fonts/truetype/ttf-dejavu/Ft2.ttf</font>. The error still occurs and the intranet error logs show the following ERROR in koha-conf.xml -- missing <font type="Ft1">/path/to/font.ttf</font> The missing font type changed from Ft2 to Ft1 (In reply to Bernardo Gonzalez Kriegel from comment #3) > > Are you using EAN13 barcodes? > I think that they can only be digits, perhaps your branch code is the > culprit. > If i remove the branchcode from the barcodes (using MarcEdit) and remain with digits (eg from 'phsl150004' to '150004') the barcodes print properly, which i think confirms that the problem is with the branchcode (In reply to Lennon Mazonde from comment #7) > (In reply to Chris Nighswonger from comment #1) > > > > > > The problem appears to be that you do not have the font configuration set > > correctly in your koha-conf.xml. This is evident from the lines like: > > > > ERROR in koha-conf.xml -- missing <font> type="Ft2">/path/to/font.ttf</font> > > > > You will need to set the path to match the location of the Truetype fonts on > > your system. > > > > This should fix the problem. If it does, please close the bug; otherwise, > > feel free to update with more information. > > > > Hi Chris, sorry for the late response. I'm assuming 'Ft2' stands for > Freetype2? I don't seem to have that font installed anywhere in my > directories (/usr/share/fonts/truetype/). How do i install it (noob alert, > step-by-step instructions would be appreciated)? > > Note: As a test, i copied and renamed one of the fonts in > /usr/share/fonts/truetype/ to 'Ft2.ttf' and set the path in koha-conf.xml to > > > <font type="Ft2">/usr/share/fonts/truetype/ttf-dejavu/Ft2.ttf</font>. > > The error still occurs and the intranet error logs show the following > > ERROR in koha-conf.xml -- missing <font type="Ft1">/path/to/font.ttf</font> > > The missing font type changed from Ft2 to Ft1 The log segment you posted originally (whether or not it is related to the EAN13 issue) shows that your system is misconfigured. As you have discovered above, you will have to configure all of the required fonts in your koha-conf.xml file in order to clear the log of errors and have other things work correctly (mainly diacriticals). The best place to get step-by-step instructions would be on the user (or maybe in this case, the developer) list. Bug 8375 may also yield some insight. After reading your subsequent followup, I do agree with Bernardo that the root of you issue is probably EAN13 issues. Sorry for not being more descriptive, but my time is crunched atm. Created attachment 40698 [details] Example barcode As you can see, there is no problem to generate labels with barcodes as you propose, but all letters must be UpperCase. If not you will find a new warning: label-create-pdf.pl: Barcode generation failed for item 35 with this error: Invalid Characters, referer: http://staffdev.koha-community.org.ar/cgi-bin/koha/labels/label-print.pl Well, after long hours debugging relevant code if found that we all were wrong Lennon because it's possible to print barcodes in this format, but all letters must be in upper case. See the new attach. Me because the problem has nothing to do with EAN13, or CODE39. Chris was right in that. The attached example use CODE39 Chris because there is no problem in the font configuration, the messages observed are real and have nothing to do with this problem. I found that our previous RM Galen inserted a followup to Bug 8375, it's addition duplicates a similar routine, that produces the messages of missing fonts Ft1 and Ft2. So if you agree I will close this bug. I opened a new one with a fix for the font path problem, Bug 14468, you are welcome to test and sign. Regards (In reply to Bernardo Gonzalez Kriegel from comment #11) > Well, after long hours debugging relevant code if found that we all were > wrong > > Lennon because it's possible to print barcodes in this format, but all > letters must be in upper case. See the new attach. > > Me because the problem has nothing to do with EAN13, or CODE39. Chris was > right in that. The attached example use CODE39 > > Chris because there is no problem in the font configuration, the messages > observed are real and have nothing to do with this problem. > > I found that our previous RM Galen inserted a followup to Bug 8375, > it's addition duplicates a similar routine, that produces the messages of > missing fonts Ft1 and Ft2. > > So if you agree I will close this bug. > I opened a new one with a fix for the font path problem, Bug 14468, > you are welcome to test and sign. > > Regards Thanks for all your work with the debugging. You can close this bug and i'll be keen to test Bug 14468 (and sign off on it?). Thanks again for your help Chris and Bernado |