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

Importing OSF DOIs via the Publications edit tab #2429

Open
allysonlister opened this issue Nov 21, 2024 · 5 comments · Fixed by #2430
Open

Importing OSF DOIs via the Publications edit tab #2429

allysonlister opened this issue Nov 21, 2024 · 5 comments · Fixed by #2430
Assignees
Labels
enhancement New feature or request medium Priority for this task is below normal
Milestone

Comments

@allysonlister
Copy link
Contributor

I cannot retrieve 10.17605/OSF.IO/9r62x from the Publications page. It's an OSF DOI. When I press Import DOI it just spins and hangs.

@knirirr asked me to make a ticket, and says: Behind the scenes a CORS problem prevents crosscite.org from redirecting to osf.io. So, not strictly a hang, but the Javascript doesn't exit cleanly and reload the buttons.

@allysonlister allysonlister added the medium Priority for this task is below normal label Nov 21, 2024
@knirirr knirirr self-assigned this Nov 21, 2024
@knirirr knirirr added the bug Something isn't working label Nov 21, 2024
@knirirr knirirr added this to the Fix milestone Nov 21, 2024
@knirirr
Copy link
Contributor

knirirr commented Nov 21, 2024

Is this actually an article? https://osf.io/9r62x/
It looks to me like the description of a resource.

What happens is that dx.doi.org doesn't get any hits, so data.crosscite.org is called next and does two things:

  1. Returns some search results which aren't what you're looking for, then...
  2. Attempts to load the web page at osf.io (not their API, if they have one), which fails with a CORS error.

I think that the proper solution here would be to attempt to catch the error at (2) and return gracefully from that; the results at (1) aren't correct and I can't deal with the redirection to a web page.

EDIT: osf.io has an API: https://developer.osf.io/

The only way to get this to work (assuming publications are being sought) is to write a new query to look for publications in osf.io directly, once the previous two have failed.

@allysonlister
Copy link
Contributor Author

ah, i see, so dx.doi.org doesn't return anything because it's not of the correct type?

Yes, it is essentially an OSF directory containing a variety of things including documents but also including all past versions of the database.

Would other osf dois that point to publications/documents/manuscripts work?

@knirirr
Copy link
Contributor

knirirr commented Nov 21, 2024

ah, i see, so dx.doi.org doesn't return anything because it's not of the correct type?

I believe so.

Would other osf dois that point to publications/documents/manuscripts work?

I don't know. Do you happen to have any to try?

@allysonlister
Copy link
Contributor Author

Try https://doi.org/10.17605/OSF.IO/3WQPR

It's a pdf but should work as adocument. however it is of resource type "other". You may need to just search osf for an appropriate resource type and take its doi.

@knirirr knirirr linked a pull request Nov 21, 2024 that will close this issue
@knirirr
Copy link
Contributor

knirirr commented Nov 21, 2024

Searching OSF will require writing new API queries; data.crosscite.org doesn't redirect correctly and so can't be used.
This will need a new PR, so please would you review the current one (which at least removes a crash) and I'll start another when I have time.

Example: https://osf.io/zn79k/, 10.17605/OSF.IO/ZN79K

knirirr added a commit that referenced this issue Nov 21, 2024
@knirirr knirirr added enhancement New feature or request and removed bug Something isn't working labels Nov 21, 2024
@knirirr knirirr modified the milestones: Fix, New feature Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium Priority for this task is below normal
Projects
Development

Successfully merging a pull request may close this issue.

2 participants