Bug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 16 Jun 2016 11:08:59 +0000 (11:08 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 13 Jun 2019 11:05:38 +0000 (12:05 +0100)
How to reproduce:
1) Edit and save an item in the items editor
2) You should be redirected back to the items editor, note that the
biblionumber is passed in the url
3) Choose "set library" from the upper right hand pulldown on the page
4) Choose a different library, click submit
5) You should get the error message:
Software error:

Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.

Test Plan:
1) Apply this patch
2) Follow plan above
3) No software error should occur at step 5

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

index 121ffc6..2dd65df 100644 (file)
     <div class="col-sm-10">
 
 <div id="cataloguing_additem_newitem">
-    <form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl" name="f">
+    <form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]" name="f">
     <input type="hidden" name="op" value="[% op | html %]" />
     [% IF (popup) %]
         <input type="hidden" name="popup" value="1" />