Bug 6866 - Accessing 'additem.pl' with no CGI params causes error
Summary: Accessing 'additem.pl' with no CGI params causes error
Status: NEW
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: 2019-05-04 11:03 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
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.