Summary: | 'Link to host item' gives internal server error | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Cataloging | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, m.de.rooy, martin.renvoize, mtompset, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 20829: Handle non-existent barcode when linking to host item
Bug 20829: Handle non-existent barcode when linking to host item |
Description
Katrin Fischer
2018-05-28 21:02:18 UTC
It seems to happen more often than not, I can't get it to work correctly right now. Someone else taking a look would be appreciated! (In reply to Katrin Fischer from comment #0) > - Verify it explodes into an internal server error Not that I have tried, but without plack is easier to trigger internal server errors in an easily debuggable way. :) I get a different one: Can't call method "itemnumber" on an undefined value at /home/vagrant/kohaclone/cataloguing/linkitem.pl line 86. Created attachment 75671 [details] [review] Bug 20829: Handle non-existent barcode when linking to host item Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem $item is not defined if the barcode is invalid, we should not call method on it in that case. Test plan: - Turn on EasyAnalyticalRecords - Go to a detail page - Edit > Link to host item - Enter an invalid barcode => With the patch you get a friendly error message => Without this patch it explodes with Can't call method "itemnumber" on an undefined value at /home/vagrant/kohaclone/cataloguing/linkitem.pl line 86. Maybe the patch does not fix the original problem, but I do not recreate it. Created attachment 75696 [details] [review] Bug 20829: Handle non-existent barcode when linking to host item Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem $item is not defined if the barcode is invalid, we should not call method on it in that case. Test plan: - Turn on EasyAnalyticalRecords - Go to a detail page - Edit > Link to host item - Enter an invalid barcode => With the patch you get a friendly error message => Without this patch it explodes with Can't call method "itemnumber" on an undefined value at /home/vagrant/kohaclone/cataloguing/linkitem.pl line 86. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Combining SO+QA for trivial fix Pushed to master for 18.11, awesome work all! This patch has been pushed to 18.05.x and will be in 18.05.01 Pushed to 17.11.x for 17.11.07 |