[Koha-bugs] [Bug 13180] Errors when acquiring from the new improved staged file, empty indicator warning
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri May 8 05:02:39 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13180
--- Comment #8 from M. Tompsett <mtompset at 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.
More information about the Koha-bugs
mailing list