Bug 21432 - Internal Server Error in Checkout History
Summary: Internal Server Error in Checkout History
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Josef Moravec
URL:
Keywords:
: 21624 (view as bug list)
Depends on: 20899
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-27 13:52 UTC by Claudio Costales
Modified: 2020-01-06 20:14 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Internal server error (39.14 KB, image/png)
2018-09-27 13:52 UTC, Claudio Costales
Details
Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons (4.40 KB, patch)
2018-10-01 21:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons (4.48 KB, patch)
2018-10-02 16:02 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Claudio Costales 2018-09-27 13:52:24 UTC
Created attachment 79511 [details]
Internal server error

Internal server error when clicking on Checkout History left menu. 

Koha 18.05.02.000

See image attached.
Comment 1 Martin Renvoize 2018-09-27 16:18:09 UTC
Could you elaborate on the error please Claudio, I can't replicate any issues on the latest 18.05.x branch or the 18.05.04 release.
Comment 2 Claudio Costales 2018-09-27 16:43:33 UTC
Of course Martin, sorry. I've just noticed a plack error. 

) Login into intranet
2) Search something
3) Click on “Checkout History” link in the left side menu as shown in the image I have attached
4) Internal server error occurs
5) Plack error:


Argument "batch_id" isn't numeric in numeric eq (==) at /usr/share/koha/lib/C4/Creators/Lib.pm line 536.
Template process failed: undef error - DBIC result _type  isn't of the _type Borrower at /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/es-ES/modules/catalogue/issuehistory.tt line 47.
Could not dup 'STDIN': Invalid argument at /usr/share/perl5/Archive/Extract.pm line 146.
Could not restore 'STDIN': Invalid argument at /usr/share/perl5/Archive/Extract.pm line 146.
Template process failed: undef error - DBIC result _type  isn't of the _type Borrower at /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt line 47.


Koha version 18.02

Hope this helps...
Comment 3 Claudio Costales 2018-09-28 19:41:42 UTC
Martin, was my last comment enough? Please contact me if you are expecting further information
Comment 4 Martin Renvoize 2018-10-01 18:59:37 UTC
Thanks Claudio, I'll get to investigating this further shortly.
Comment 5 Claudio Costales 2018-10-01 19:00:58 UTC
;)
Comment 6 Jonathan Druart 2018-10-01 20:37:30 UTC
Confirmed on master if a patron has been removed.
Comment 7 Jonathan Druart 2018-10-01 20:38:27 UTC
Caused by
  commit 3c65318243de786bdc11d9ad335a253d59754d74
  Bug 20899: Fix patron's name display
Comment 8 Jonathan Druart 2018-10-01 21:10:30 UTC
Created attachment 79785 [details] [review]
Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons

Template process failed: undef error - DBIC result _type  isn't of the
_type Borrower at
/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
line 54.

Koha::Old::Checkout->patron should return undef if the patron record has
been removed.

Test plan:
- Check 2 items out on the same bibliographic record
- Check them in
- Delete the patron's record of one of the issuer (Is this word really
exist?)
- View the checkout history for this bib record (Home › Catalog ›
Checkout history)
=> Without this patch you get the error
=> With this patch applied one of the "Patron" cells will be empty
Comment 9 Jonathan Druart 2018-10-01 21:10:49 UTC
Upping severity.
Comment 10 Claudio Costales 2018-10-02 12:30:45 UTC
I have made a test in a local installation and it works fine!
Comment 11 Jonathan Druart 2018-10-02 12:50:04 UTC
(In reply to Claudio from comment #10)
> I have made a test in a local installation and it works fine!

Can you add your signed-off-by stamp on the patch?
Comment 12 Claudio Costales 2018-10-02 12:55:17 UTC
The fix works fine! Thanks Martin and Jonathan!
Comment 13 Josef Moravec 2018-10-02 16:02:41 UTC
Created attachment 79828 [details] [review]
Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons

Template process failed: undef error - DBIC result _type  isn't of the
_type Borrower at
/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
line 54.

Koha::Old::Checkout->patron should return undef if the patron record has
been removed.

Test plan:
- Check 2 items out on the same bibliographic record
- Check them in
- Delete the patron's record of one of the issuer (Is this word really
exist?)
- View the checkout history for this bib record (Home › Catalog ›
Checkout history)
=> Without this patch you get the error
=> With this patch applied one of the "Patron" cells will be empty

Signed-off-by: Claudio <costalc@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 14 Nick Clemens 2018-10-05 16:26:16 UTC
Awesome work all!

Pushed to master for 18.11
Comment 15 Martin Renvoize 2018-10-08 08:42:31 UTC
Pushed to 18.05.x for 18.05.05

Thanks for jumping on this one Jonathan.
Comment 16 Fridolin Somers 2018-10-19 06:29:51 UTC
Depends on Bug 20899 not in 17.11.x
Comment 17 Barton Chittenden 2018-10-20 17:34:18 UTC
*** Bug 21624 has been marked as a duplicate of this bug. ***