[Koha-bugs] [Bug 24809] New: OAI PMH can fail on fetching deleted records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 5 11:53:47 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24809

            Bug ID: 24809
           Summary: OAI PMH can fail on fetching deleted records
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Authentication
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: nick at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
                CC: dpavlin at rot13.org

When calling GetRecord if we pass a deleted biblionumber that has a deleted
item we can end up thinking a record that is deleted is not deleted and so fail
on getting the record

The problem is here:
 48             UNION
 49             SELECT timestamp from deleteditems
 50             WHERE biblionumber=?

If you delete an item from a record, then delete the record, the first query
gets a timestamp and then attempts to get the record as if it is not deleted


To recreate:
1 - Edit/create a file in the koha home dir '/var/lib/koha/{instance}/OAI.yaml
2 - Set sysprefs:
  OAI-PMH => Enable
  OAI-PMH:ConfFile => /var/lib/koha/{instace}/OAI.yaml
3 - View a record with items and confirm the items show:
 
http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=KOHA-OAI-TEST:4
4 - Delete the items, then delete the record
5 - Reload the URL from step 3
6 - Internal Server Error:
    Empty String at /kohadevbox/koha/Koha/OAI/Server/Record.pm line 58.
 at /usr/share/perl/5.24/Carp.pm line 167

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list