-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAI: If item identifier has special characters, temp metadata filename doesn't match filegetter #508
Comments
Trying to find where $record_key is first defined. |
I've never liked the fact that the OAI identifiers are so ugly and complex. There is a spec for OAI-PMH identifiers, that defines identifiers using the pattern But there is a problem with this: the OAI identifier spec uses Maybe a general way to approach this is to modify MIK to strip out everything before and after the local identifier part and then to replace any |
That sounds reasonable to me. Where are you thinking of doing this, and what would the function be? For a quick and dirty patch, I'm thinking the convert-to-underscore would have to happen here: https://github.com/MarcusBarnes/mik/blob/master/src/fetchers/Oaipmh.php#L80-L82 That might just do the job... What do you think? |
OK, I've made a change. In that section:
This seems to work; I'm getting files! Unfortunately, the files are not being written to the directories that are created... Weird. |
I'm doing an OAI migration, and running into problems in
src/fetchers/Oaipmh.php
.The Fetcher assumes that the
$identifier
and$record_key
are the same value, but they aren't necessarily.If the item identifier contains special characters (e.g.
oai:thisvancouver.vpl.ca:islandora_1910
), MIK treats it differently in different contexts.When writing the temporary metadata files: https://github.com/MarcusBarnes/mik/blob/master/src/fetchers/Oaipmh.php#L80-L82
Resulting filename:
oai%3Athisvancouver.vpl.ca%3Aislandora_1910.metadata
.But the
$record_key
that is used everywhere else in the code looks like this:oai_thisvancouver.vpl.ca_islandora_1910
.So you end up with problems like this:
Because the filegetter is looking for
$record_key.metadata
, while the actual filename is$identifier.metadata
. So it can't actually find the file.So... how the heck do we fix this?
The text was updated successfully, but these errors were encountered: