Skip to content
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

Multiple fields ignored #4

Closed
raphihalff opened this issue Feb 12, 2021 · 7 comments
Closed

Multiple fields ignored #4

raphihalff opened this issue Feb 12, 2021 · 7 comments

Comments

@raphihalff
Copy link

If I have several omeka fields of the same kind for an certain item (say multiple creators, or multiple languages), the plugin takes only one of them.

@zerocrates
Copy link
Member

What software are you using to consume the Coins data?

My (dim) recollection here is that the Coins plugin purposely only includes first values for each field because multiple, though allowed by the spec when using Dublin Core in a context object, wasn't well-tolerated by programs reading the coins metadata. But that could be an outdated concern by now.

@raphihalff
Copy link
Author

I am using the zotero add on (or plugin) for firefox 85.0.2 on mac. It reads multiple authors fine on other sites (mainly library catalogs).

@zerocrates
Copy link
Member

OK, it's Zotero. I think that's what the majority of people are using the Coins plugin for.

I think it's actually Zotero that the current setup caters to: we allow multiple values for everything, but Zotero doesn't. Just putting out all the values, if I'm remembering correctly, results in things like the last Title being used, which is rarely what people want.

That being said, we could probably change things so the Coins plugin outputs multiple values where they are supported, like for authors (and I believe subjects, I'll have to look into that more closely).

@raphihalff
Copy link
Author

Yes, as you say, I think Zotero doesn't accept multiple values for anything BUT author/contributor. It seems, looking at the coins plugin code, that it loops through the list of dublin core elements and gets whatever value the _getElementText function returns, which I think is only one value.

@zerocrates
Copy link
Member

Yes, you're correct on how Coins works.

It's using the metadata helper function under the hood, which can be changed to return all values instead of just the first one. We'd just have to add an argument or a parallel _getAllElementTexts method that does that instead, and split off the appropriate elements to use that method instead.

@raphihalff
Copy link
Author

I can try to work on it submit a pull request

@zerocrates
Copy link
Member

By all means, take a crack at it.

I think the major complication is going to be that, once you have multiple values with the same key, you can't use http_build_query anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants