When I go to add an item I get the following errors in koha-error_log. I am trying to invoke callnumber.pl to automatically assign the item callnumber. So I have callnumber.pl selected as a plugin in my MARC framework for 952$o. I have not modified anything in callnumber.pl, nor additem.pl. If it were working I would expect items.itemcallnumber to be set, and something to be printed under "Call Number" in the Normal/MARC view of item details. Neither is true for me, so I think it is not working for me. Any ideas? Thanks for your time, Pete. /var/log/koha/koha-error_log: ... [Wed Dec 08 13:44:45 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:44:45 20 10] additem.pl: Subroutine plugin_parameters redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 39., referer: http://koh a-admin/cgi-bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:44:45 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:44:45 20 10] additem.pl: Subroutine plugin_javascript redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 42., referer: http://koh a-admin/cgi-bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:44:45 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:44:45 20 10] additem.pl: Subroutine plugin redefined at /usr/share/koha/intranet/cgi-bin/ cataloguing/value_builder/callnumber.pl line 73., referer: http://koha-admin/cgi -bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:45:01 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:01 20 10] additem.pl: Subroutine plugin_parameters redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 39., referer: http://koh a-admin/cgi-bin/koha/cataloguing/additem.pl?biblionumber=59 [Wed Dec 08 13:45:01 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:01 20 10] additem.pl: Subroutine plugin_javascript redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 42., referer: http://koh a-admin/cgi-bin/koha/cataloguing/additem.pl?biblionumber=59 [Wed Dec 08 13:45:01 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:01 20 10] additem.pl: Subroutine plugin redefined at /usr/share/koha/intranet/cgi-bin/ cataloguing/value_builder/callnumber.pl line 73., referer: http://koha-admin/cgi -bin/koha/cataloguing/additem.pl?biblionumber=59 [Wed Dec 08 13:45:46 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:46 20 10] additem.pl: Subroutine plugin_parameters redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 39., referer: http://koh a-admin/cgi-bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:45:46 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:46 20 10] additem.pl: Subroutine plugin_javascript redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 42., referer: http://koh a-admin/cgi-bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:45:46 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:45:46 20 10] additem.pl: Subroutine plugin redefined at /usr/share/koha/intranet/cgi-bin/ cataloguing/value_builder/callnumber.pl line 73., referer: http://koha-admin/cgi -bin/koha/catalogue/detail.pl?biblionumber=59 [Wed Dec 08 13:48:34 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:48:34 20 10] additem.pl: Subroutine plugin_parameters redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 39., referer: http://koh a-admin/cgi-bin/koha/cataloguing/additem.pl?biblionumber=59 [Wed Dec 08 13:48:34 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:48:34 20 10] additem.pl: Subroutine plugin_javascript redefined at /usr/share/koha/intran et/cgi-bin/cataloguing/value_builder/callnumber.pl line 42., referer: http://koh a-admin/cgi-bin/koha/cataloguing/additem.pl?biblionumber=59 [Wed Dec 08 13:48:34 2010] [error] [client 192.168.0.21] [Wed Dec 8 13:48:34 20 10] additem.pl: Subroutine plugin redefined at /usr/share/koha/intranet/cgi-bin/ cataloguing/value_builder/callnumber.pl line 73., referer: http://koha-admin/cgi -bin/koha/cataloguing/additem.pl?biblionumber=59 koha@server2:/var/log/koha$ -- View this message in context: http://koha.1045719.n5.nabble.com/callnumber-pl-errors-in-koha-error-log-tp3... Sent from the Koha - Discuss mailing list archive at Nabble.com.
Following up, In Koha 3.2-5 it appears that callnumber.pl does not work without a simple fix. I had to add the following line at the top of the file to work around it. use C4::Auth qw(get_template_and_user); An error was reported in the koha-error_log indicating that get_template_and_user was not defined. Also, it was hard to debug our customized callnumber.pl callback (value_builder). I was able to add print statements that would print in context (in the field I was trying to add the callback for). print "Content-type: text/html\n\n"; print ... (This redirects whatever you print to the field. Sometimes error messages also appear). I hope this helps someone, Pete. -- View this message in context: http://koha.1045719.n5.nabble.com/callnumber-pl-errors-in-koha-error-log-tp3... Sent from the Koha - Discuss mailing list archive at Nabble.com.
On Wed, Mar 16, 2011 at 1:55 PM, Peter Huerter <pete.huerter@gmail.com> wrote:
Following up,
In Koha 3.2-5 it appears that callnumber.pl does not work without a simple fix.
I had to add the following line at the top of the file to work around it.
use C4::Auth qw(get_template_and_user);
An error was reported in the koha-error_log indicating that get_template_and_user was not defined.
That's because callnumber.pl is written as a plugin and not to be executed directly. It is executed via a 'do' from within another script which has already loaded up the required modules. See http://tinyurl.com/4t7nsc5 However, the value of open source software is once again exemplified in the fact that you were able to modify it to work for your application. Kind Regards, Chris
Hi Chris, I am invoking it as a callback. In order to get it to work I had to respond to the error in the koha-error_log, however I re-factored the code for our purposes. Perhaps there is another issue then, but I am pretty sure I am using the value_builder structure in the way it is intended. Thanks, Pete. -- View this message in context: http://koha.1045719.n5.nabble.com/callnumber-pl-errors-in-koha-error-log-tp3... Sent from the Koha - Discuss mailing list archive at Nabble.com.
Hiya Let's move this one to koha-devel too please Chris On 17 Mar 2011 07:38, "Peter Huerter" <pete.huerter@gmail.com> wrote: Hi Chris, I am invoking it as a callback. In order to get it to work I had to respond to the error in the koha-error_log, however I re-factored the code for our purposes. Perhaps there is another issue then, but I am pretty sure I am using the value_builder structure in the way it is intended. Thanks, Pete. -- View this message in context: http://koha.1045719.n5.nabble.com/callnumber-pl-errors-in-koha-error-log-tp3... Sent from the Koha - Discuss mailing list archive at Nabble.com. ___________________________________... Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailm...
participants (3)
-
Chris Cormack -
Chris Nighswonger -
Peter Huerter