PaperBadger
PaperBadger copied to clipboard
Widget doesn't return results for DOIs with extra stashes.
The widget returns badges for doi 10.1186/2047-217X-3-13
https://badges.mozillascience.org/papers/10.1186/2047-217X-3-13/badges
However the widget doesn't return badges for 10.1093/nar/gkt1063
https://badges.mozillascience.org/papers/10.1093/nar/gkt1063/badges I'm guess this has to do with the second slash of the doi.
You need to encode the 2nd half of the doi https://badges.mozillascience.org/papers/10.1093/nar%2Fgkt1063/badges
Hum...I would expect the javascript widget to do if we are trying to make the widget as easy as possible to use. Also the DIO is a value. Not encoding one half of a value and encoding the other half doesn't make a whole lot of sense.
+1 good points
@rcpeters, @acabunoc -- Quite frankly the widget treats the doi as a string, you could put any number of slashes in it and it will still create an endpoint string. It also does this with the updated code, yet to be committed.
Have you tried: https://badges.mozillascience.org/papers/10.1093/nar/gkt1063/badges
This yields: "Page not found"
Does this article have any badges?
@Alicole - This is the correct link, there are badges: https://badges.mozillascience.org/papers/10.1093/nar%2Fgkt1063/badges
I think we can handle this on the app side for usability :)
@acabunoc -- Thanks for that -- yes when you use the url encoding character for / %2F it works.
Agreed -- for usability it'll probably be better if you can find a way to make this work at your end.
While this is address in /widget.js
, I'll keep this open since I'd like to fix this on the app side
@acabunoc -- in terms of the url with %2F -- is this something that you've look at? Or is it still outstanding? Do you know if this has posed any issues with the wider community?
Hey @Alicole! i haven't had a chance to look at it -- still outstanding!
It's pretty rare, but does affect the wider community. I'm still at #mozsprint, this might be a good task for today!
@acabunoc -- Thanks it would be great if this was closed soon, as it would help prevent any issues with url path inconsistencies.
@Alicole I'll make this a priority!
on review #212