[Bug 4188] New: Basketgroup print fails to generate a file
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Summary: Basketgroup print fails to generate a file Product: Koha Version: HEAD Platform: PC OS/Version: All Status: NEW Severity: major Priority: P5 Component: Acquisitions AssignedTo: henridamien@koha-fr.org ReportedBy: colin.campbell@ptfs-europe.com Estimated Hours: 0.0 Change sponsored?: --- Trying to print a basket group fails silently. The pdf download box appears with an invalid filw name ( .pdf) . The following errors can be seen in the log [Sun Feb 14 19:45:39 2010] basketgroup.pl: Using a hash as a reference is deprecated at /home/koha/kohaclone/acqui/basketgroup.pl line 240. [Sun Feb 14 19:45:39 2010] basketgroup.pl: 1 at /home/koha/kohaclone/acqui/basketgroup.pl line 187. [Sun Feb 14 19:45:39 2010] basketgroup.pl: GLOB(0xac8c920) not a PDF file version 1.x at /usr/share/perl5/PDF/API2/Basic/PDF/File.pm line 302. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-02-15 09:28:04 --- Bug also reported as part of bug 3622 with screenshot -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #2 from Nicole C. Engard <nengard@gmail.com> 2010-02-15 12:20:11 --- *** Bug 3915 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 frederic@tamil.fr changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Severity|major |blocker Priority|P5 |P1 --- Comment #3 from frederic@tamil.fr 2010-04-18 09:34:52 --- Taking a look at the code, it appears that the 'printpdf' function, located in acqui/pdfformats/layout2pages.pm module, expect to have a 'OrderPdfTemplate' syspref containing a full PDF template to based on generated PDF file. This PDF template exists as a file in the module directory: layout2pages.pdf. If its content is copied into 'OrderPdfTemplate' syspref, it works! -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 --- Comment #4 from frederic@tamil.fr 2010-04-18 09:54:28 --- A suggested patch: http://lists.koha.org/pipermail/koha-patches/2010-April/006036.html -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> 2010-04-30 12:40:04 --- I repeat the request I made on 19 April 2010 via a koha-patches email for somebody from BibLibre to comment on this bug and Frédéric's proposed patch. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Jean-André Santoni <jeanandre.santoni@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeanandre.santoni@biblibre.c | |om --- Comment #6 from Jean-André Santoni <jeanandre.santoni@biblibre.com> 2010-04-30 13:41:02 --- You have to upload the PDF in the OrderPdfTemplate syspref. This syspref is of the type 'upload', it can contain the whole pdf file, base64 encoded in a BLOB. This way, users can customize their PDF (as long as they respect the differents layouts proposed by Koha) Maybe patches are incomplete, or some of them have been lost in the trip? I know that this sort of syspref is a bad idea, but I had no other : Paul asked to to NEVER let users upload real files on the server. I never understood why. In the PHP world we do it all the time (see Drupal) for exemple. Maybe because the security issues aren't the same when running as CGI or as apache module? ...but I think we should not loose this feature wich might be usefull for some people. It just need to be documented. What do you think? -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |3985 -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4188 --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> 2010-05-04 16:05:25 --- (In reply to comment #6)
You have to upload the PDF in the OrderPdfTemplate syspref. This syspref is of the type 'upload', it can contain the whole pdf file, base64 encoded in a BLOB.
This way, users can customize their PDF (as long as they respect the differents layouts proposed by Koha)
Maybe patches are incomplete, or some of them have been lost in the trip?
I know that this sort of syspref is a bad idea, but I had no other : Paul asked to to NEVER let users upload real files on the server. I never understood why. In the PHP world we do it all the time (see Drupal) for exemple. Maybe because the security issues aren't the same when running as CGI or as apache module?
...but I think we should not loose this feature wich might be usefull for some people. It just need to be documented. What do you think?
Thanks for the explanation. Unfortunately, the ability to upload PDF templates, while something I am OK with in principle, has a severe limitation: layout2pages.pm and layout3pages.pm currently hardcode absolute positions on the template to place text from the order. That means that only very trivial changes to the templates could be made without forcing the user to edit the Perl files. If you make them do that, which would be a server-based operation, they can just as well upload new PDF templates. For 3.2, I will push a version of Frédéric's patch and hide the OrderPdfTemplate syspref. It can be revived in 3.4, hopefully with a better templating engine such as PDF::Reuse underneath so that we can also get rid of the hard-coded position in layout[23]pages.pm. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@kohaorg.ec2.liblime.com