Bug #10279

AtoM returns "badVerb" response instead of "cannotDisseminateFormat" when OAI-PMH request made for unavailable metadata format

Added by Dan Gillean almost 4 years ago. Updated almost 2 years ago.

Status:VerifiedStart date:09/07/2016
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:OAI-PMH
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

First reported via the user forum, 2016-09-06: https://groups.google.com/d/msg/ica-atom-users/EsoaZ9xWfvs/n_2s1P49BwAJ

To reproduce

  • Ensure the OAI plugin is enabled, and that your OAI repository is configured in Admin > Settings
  • Try something like the following request (requesting oai_ead, a format we do not support):
http://www.example.com/index.php/;oai?verb=ListIdentifiers&metadataPrefix=oai_ead

Resulting error

AtoM returns a "badVerb" response:

<OAI-PMH xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2016-09-07T19:43:34Z</responseDate><request verb="ListIdentifiers" metadataPrefix="oai_ead">http://www.example.com/;oai</request>
<error code="badVerb">The metadata format identified by the value given for the metadataPrefix argument is not supported by the item or by the repository.</error>
</OAI-PMH>

Expected result

According to OAI-PMH, AtoM should return a "cannotDisseminateFormat response when the verb itself is valid but the format requested is not. This should be the case for the following verbs:

  • GetRecord
  • ListIdentifiers
  • ListRecords

See: https://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm#ErrorConditions

Note:

The user who reported the bug has also provided a patch. From the description in the user forum, it sounds like the patch might only deal with the ListRecords response - but it's still an improvement. Attaching the patch so it can be code reviewed and potentially merged.

0001-Corrected-error-code-for-ListRecords-with-erroneous-.patch Magnifier (1.41 KB) Dan Gillean, 09/07/2016 03:54 PM


Related issues

Related to Access to Memory (AtoM) - Bug #11827: OAI-PMH returns cannotDisseminateFormat error when using ... Feedback 12/27/2017

History

#1 Updated by Dan Gillean almost 4 years ago

Note from the patch submitter: " I think the patch fixes GetRecord and ListIdentifiers too, it’s in the execute function in indexAction.class.php which seem to do error handling for all OAI-PMH verbs."

#2 Updated by Nick Wilkinson almost 4 years ago

  • Assignee set to Steve Breker

#3 Updated by Steve Breker almost 4 years ago

I have created a dev branch from the submitted patch. Testing shows that this fix works for:

  • GetRecord
  • ListIdentifiers
  • ListRecords

https://github.com/artefactual/atom/pull/441

#4 Updated by Steve Breker almost 4 years ago

  • Status changed from New to Code Review
  • Assignee changed from Steve Breker to Nick Wilkinson

#5 Updated by Steve Breker almost 4 years ago

  • Status changed from Code Review to QA/Review

Merged. Ready for QA.

#6 Updated by Nick Wilkinson almost 4 years ago

  • Assignee changed from Nick Wilkinson to Dan Gillean

#7 Updated by Dan Gillean almost 4 years ago

  • Status changed from QA/Review to Verified

I found what appears to be a regression while testing for this, but after testing before the merge, I think this is unrelated to the patch. The fix itself does what it advertises; marking verified.

Thanks to Martin Malmsten for this bug report and community code contribution!

#8 Updated by David Juhasz over 2 years ago

  • Related to Bug #11827: OAI-PMH returns cannotDisseminateFormat error when using "oai_ead" metadataPrefix added

#9 Updated by Dan Gillean almost 2 years ago

  • Target version set to Release 2.4.0

Also available in: Atom PDF