Help with OAI-PMH

56 views
Skip to first unread message

Arquivo História Social

unread,
Aug 25, 2026, 10:32:19 AMAug 25
to AtoM Users
Hello! 

I'm trying to set up the OAI repository in AtoM because a certain service needs to extract our records through the OAI PMH protocol. 

However, I have two problems. The first one is this Internal Error I have that shows up when i put the ;oai index page on the browser bar. 

<error code="500" message="Internal Server Error">
<debug>
<name>sfConfigurationException</name>
<message>The component does not exist: "arOaiPlugin", "badVerb".</message> 

And the second one has to do with the verb ListRecords which gives the following error: 

<error code="cannotDisseminateFormat">The metadata format identified by the value given for the metadataPrefix argument is available for item ....

Is the Internal Error connected to the ListRecords error? I know that for fixing the ListRecords error I have to cache the XML but i want to know if that will solve the other error as well or if these are two unrelated problems...

Thank you so much for your attention!


Johan Pieterse

unread,
Aug 29, 2026, 11:32:30 AMAug 29
to AtoM Users

Hello,

They are two separate problems. Caching the XML will fix the ListRecords one and will not touch the Internal Error, so do not be surprised when the 500 is still there afterwards.

1. The 500 on the bare ;oai URL

This is a bug in arOaiPlugin rather than anything you have configured wrongly, and it fires only when the verb argument is missing altogether.

In indexAction.class.php the whole validation block sits inside if (isset($this->request->verb)). With no verb there is nothing to validate, so control falls to the else, which sets $this->verb = 'badVerb' and renders the normal template. indexSuccess.xml.php then calls:

<?php echo get_component('arOaiPlugin', $verb); ?>

The plugin ships _badVerb.xml.php but no badVerbComponent.class.php, and a partial on its own is not enough for get_component() - every other verb has a component class. Hence "The component does not exist".

Worth knowing: an invalid verb is handled correctly. ?verb=Nonsense forwards to the error action and returns proper OAI badVerb XML. It is only the empty request that breaks.

So this does not block harvesting. OAI-PMH requires a verb on every request and no harvester ever fetches the bare base URL, which is why the bug has survived. Test your endpoint with ?verb=Identify and you should get a clean response.

2. cannotDisseminateFormat on ListRecords

You are asking for metadataPrefix=oai_ead. AtoM will not generate EAD on the fly - the code comment says as much, since EAD can take a long time to build - so it serves EAD only from cache files written earlier. listRecordsComponent checks each matching record for a cache file and emits one cannotDisseminateFormat per record that has none, which is why you get it against specific items.

Two steps:

  • Admin > Settings > Global, set Cache description XML exports upon creation/modification to yes.
  • That setting only catches descriptions saved from then on, so generate the cache for what you already have:
    php symfony cache:xml-representations

Two things that will save you time. EAD is exported per top-level unit: for oai_ead, ListRecords forces topLevel => true, limit => 1, so you get one fonds or collection per response and walk the rest with resumption tokens. And oai_dc needs none of this - it is built live when no cache exists, so if the harvesting service will accept Dublin Core, that path works immediately.

One last thing that may have confused the diagnosis: the message text itself is wrong. The template reads "...is available for item X" where it plainly means "is not available". So the error is telling you the cache file is missing, not that the format is fine.

Regards
Johan Pieterse
The Archive and Heritage Digital Commons Group (Pty) Ltd
https://theahg.co.za

Arquivo História Social

unread,
Aug 31, 2026, 12:17:00 PMAug 31
to AtoM Users
> I realized that the ;oai page does not work without a verb so it has to always have the verb!  

I would delete the thread but I can't. 



Johan Pieterse

unread,
Sep 1, 2026, 2:33:57 AMSep 1
to AtoM Users
Hi  Arquivo 

It is good for others who also have simular questions. Just leave the discussion.

JOhan

Reply all
Reply to author
Forward
0 new messages