After enabling AutoUpdateSets for OAI we started seeing random failures when the script tried to add orders to baskets: {UNKNOWN}: Can't call method "items" on an undefined value at /usr/share/koha/lib/Koha/Biblio/Metadata.pm line 233. at /usr/share/koha/lib/C4/Biblio.pm line 318 We tracked it down to C4::OAI::Sets::UpdateOAISetsBiblio which received a null biblionumber, but we couldn't determine why. As a workaround we disabled the update of sets during ordering, and the problem went away. Filing here in case someone else encounters this: env "OVERRIDE_SYSPREF_OAI-PMH:AutoUpdateSets=0" perl $KOHA_CRON_PATH/marc_ordering_process.pl