[Bug 13180] New: While acquiring from the new improved staged file, warning "Indicator in 952 is empty at /home/koha/kohaclone/C4/Biblio.pm" is flooding the bejesus out of my koha-error.log
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Bug ID: 13180 Summary: While acquiring from the new improved staged file, warning "Indicator in 952 is empty at /home/koha/kohaclone/C4/Biblio.pm" is flooding the bejesus out of my koha-error.log Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org I get one warning for each mapped Koha items field. This patch fakes the missing indicators to the addorderiso2709.pl/.tt. Those indicators don't really exists for field 952 anyway. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7180 Assignee|koha-bugs@lists.koha-commun |olli-antti.kivilahti@jns.fi |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 33078 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33078&action=edit Bug 13180 - While acquiring from the new improved staged file, warning "Indicator in 952 is empty at /home/koha/kohaclone/C4/Biblio.pm" is flooding the bejesus out of my koha-error.log I get one warning for each mapped Koha items field. This patch fakes the missing indicators to the addorderiso2709.pl/.tt. Those indicators don't really exists for field 952 anyway. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|7180 |5961 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7180 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|While acquiring from the |Errors when acquiring from |new improved staged file, |the new improved staged |warning "Indicator in 952 |file |is empty at | |/home/koha/kohaclone/C4/Bib | |lio.pm" is flooding the | |bejesus out of my | |koha-error.log | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 33078 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33078 Bug 13180 - While acquiring from the new improved staged file, warning "Indicator in 952 is empty at /home/koha/kohaclone/C4/Biblio.pm" is flooding the bejesus out of my koha-error.log Review of attachment 33078: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13180&attachment=33078) ----------------------------------------------------------------- ::: acqui/addorderiso2709.pl @@ +272,2 @@
my @ind_tag = $input->param('ind_tag'); my @indicator = $input->param('indicator');
Hum? This line already exists. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- + my @indicator = $input->param('indicator'); #Passing the imaginary empty " " -indicators from the templates, to stop C4::Biblio::TransformHtmlToXml() to warn the bejesus out of my koha-error.log my @ind_tag = $input->param('ind_tag'); my @indicator = $input->param('indicator'); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Could you please update the patch with a decent commit message? :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 --- Comment #5 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 33375 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33375&action=edit Bug 13180 - Errors when acquiring from the new improved staged file, empty indicator warning, is flooding the gosh-darn out of my koha-error.log... Nice to have you back joubu! I get one warning for each mapped Koha items field. This patch fakes the missing indicators to the addorderiso2709.pl/.tt. Those indicators don't really exists for field 952 anyway. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33078|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff Summary|Errors when acquiring from |Errors when acquiring from |the new improved staged |the new improved staged |file |file, empty indicator | |warning --- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Fixed the indecent commit message. I am so sorry about that :( -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 --- Comment #7 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Maybe it would be best to just hard-code the indicator as ' ' in the addorderiso2709.pl instead of dragging it all the way from the templates? Smarter men can decide. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 33375 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33375 Bug 13180 - Errors when acquiring from the new improved staged file, empty indicator warning, is flooding the gosh-darn out of my koha-error.log... Nice to have you back joubu! Review of attachment 33375: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13180&attachment=33375) ----------------------------------------------------------------- I stopped before I cried too much, not because of this patch, but because of the resulting issue(s) I found. ::: acqui/addorderiso2709.pl @@ +269,4 @@
my @field_values = $input->param('field_value'); my @serials = $input->param('serial'); my @ind_tag = $input->param('ind_tag'); + my @indicator = $input->param('indicator'); #Passing the imaginary empty " " -indicators from the templates, to stop C4::Biblio::TransformHtmlToXml() to warn the bejesus out of my koha-error.log
First, why is it @indicator and only $input->param and not $input->multi_param? Next, why not append "// ();" so as to reduce the number of files modified?! In fact, as far as I can tell addorderido2709.pl can't be called with an indicator parameter! $ git grep addorderiso2709.pl acqui/addorder.pl: print $input->redirect("/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=$import_batch_id&basketno=$basketno&booksellerid=$booksellerid"); --- This won't pass indicator. acqui/addorderiso2709.pl:$template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl", --- This doesn't do anything to pass indicator. koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc: <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]"> From a staged file</a></li> --- This is a link. No indicator passed. koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt: <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform"> --- Only the actual template could pass it. $ grep indicator ... --- You get the idea, nothing was there. @@ +275,5 @@
push @{ $item->{subfields} }, $subfields[0]; push @{ $item->{field_values} }, $field_values[0]; push @{ $item->{ind_tag} }, $ind_tag[0]; push @{ $item->{indicator} }, $indicator[0]; + my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values, \@indicator, \@ind_tag );
I checked the prototype of the TransfromHtmlToXML: $tags, $subfields, $values, $indicator, $ind_tag, $auth_type I see you caught the swapped parameters. Good! :) ARG! C4::Biblio insanity ($ind_tag isn't even used in the function!) ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ +299,4 @@
<input type="hidden" name="itemid" value="1" /> <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" /> <input type="hidden" name="tag" value="[% iteminformatio.tag %]" /> + <input type="hidden" name="indicator" value=" " /> [%#Pass imaginary indicators to stop warnings in C4::Biblio::TransformHtmlToXml() %]
Yuck. No. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Perhaps we can get a better patch? I'm switching to Failed QA so it doesn't languish in the "In Discussion" queue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11247 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org