Bug 6866 - Accessing 'additem.pl' with no CGI params causes error
Summary: Accessing 'additem.pl' with no CGI params causes error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 04:03 UTC by Robin Sheat
Modified: 2021-06-14 21:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Sheat 2011-09-13 04:03:08 UTC
If you access /cgi-bin/koha/cataloguing/additem.pl directly, you get:

Can't call method "fields" on an undefined value at /mnt/catalyst/koha/C4/Biblio.pm line 2133.

This is in the 'TransformMarcToKoha' function, which is called from additem.pl. It should probably do something sensible (redirect to the main cataloguing page?) if there is no record found from the supplied biblionumber.

This can happen, for example, if you change libraries when on the additem page.
Comment 1 Katrin Fischer 2019-05-04 11:03:32 UTC
This is still valid:

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

Would be nice to catch this and display a human-friendlier error.
Comment 2 Owen Leonard 2020-09-14 14:22:37 UTC
This appears to have been fixed.