Bug 17744 - OAI: oai_dc has no element named dcCollection
Summary: OAI: oai_dc has no element named dcCollection
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Julian Maurice
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 12252
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-08 09:12 UTC by Julian Maurice
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

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


Attachments
Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses (803 bytes, patch)
2016-12-08 09:15 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses (871 bytes, patch)
2016-12-14 22:27 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses (956 bytes, patch)
2016-12-15 14:34 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[3.22.x] Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses (713 bytes, patch)
2017-01-02 10:57 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2016-12-08 09:12:59 UTC
OAI GetRecord and ListRecords, when called with metadataPrefix=oai_dc, return something like this:

  <metadata>
    <oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
      <oai_dc:dc>
        <oai_dc:title>...</oai_dc:title>
        ...
      </oai_dc:dc>
    </oai_dc:dcCollection>
  </metadata>

According to http://www.openarchives.org/OAI/2.0/oai_dc.xsd there is no dcCollection element in oai_dc. Moreover the OAI Repository Explorer (http://re.cs.uct.ac.za/) returns errors about this:

  [Error] re.ZeDK9z:3:756: cvc-complex-type.2.4.a: Invalid content was found starting with element 'oai_dc:dcCollection'. One of '{"http://www.openarchives.org/OAI/2.0/oai_dc/":dc}' is expected.
  
Some other OAI harvesting tools also fail to parse the response successfully.

I found a discussion about this: https://lists.katipo.co.nz/public/koha/2016-April/045130.html
There is a patch provided (https://lists.katipo.co.nz/public/koha/2016-April/045283.html) but no bug was opened.

This is a regression caused by bug 12252, and it affects all versions since 3.22
Comment 1 Julian Maurice 2016-12-08 09:15:47 UTC
Created attachment 58036 [details] [review]
Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses
Comment 2 Julian Maurice 2016-12-08 09:19:22 UTC
Test plan:

1. Empty system preference OAI-PMH:ConfFile
2. Go to http://opac.tld/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc
3. Confirm you have oai_dc:dcCollection element in <metadata>
4. Apply patch
5. Repeat 2
6. Confirm you don't have oai_dc:dcCollection element in <metadata>
Comment 3 Josef Moravec 2016-12-14 22:27:46 UTC
Created attachment 58192 [details] [review]
[SIGNED-OFF] Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Marcel de Rooy 2016-12-15 14:34:30 UTC
Created attachment 58204 [details] [review]
Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Kyle M Hall 2016-12-16 11:05:26 UTC
Pushed to master for 17.05, thanks Julian!
Comment 6 Katrin Fischer 2016-12-18 18:43:23 UTC
This patch has been pushed to 16.11.x, will be in 16.11.01.
Comment 7 Julian Maurice 2017-01-02 10:57:24 UTC
Created attachment 58553 [details] [review]
[3.22.x] Bug 17744: Remove the oai_dc:dcCollection wrapper in OAI responses
Comment 8 Julian Maurice 2017-01-02 10:57:51 UTC
Pushed to 3.22.x for 3.22.14
Comment 9 Mason James 2017-01-29 11:47:55 UTC
Pushed to 16.05.x, for 16.05.07 release