PaperBadger icon indicating copy to clipboard operation
PaperBadger copied to clipboard

Widget doesn't return results for DOIs with extra stashes.

Open rcpeters opened this issue 9 years ago • 12 comments

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.

rcpeters avatar Sep 27 '15 21:09 rcpeters

You need to encode the 2nd half of the doi https://badges.mozillascience.org/papers/10.1093/nar%2Fgkt1063/badges

abbycabs avatar Sep 27 '15 22:09 abbycabs

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.

rcpeters avatar Sep 27 '15 23:09 rcpeters

+1 good points

abbycabs avatar Sep 27 '15 23:09 abbycabs

@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 avatar Sep 29 '15 15:09 Alicole

@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 :)

abbycabs avatar Sep 29 '15 15:09 abbycabs

@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.

Alicole avatar Sep 29 '15 15:09 Alicole

While this is address in /widget.js, I'll keep this open since I'd like to fix this on the app side

abbycabs avatar Dec 22 '15 15:12 abbycabs

@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?

Alicole avatar Jun 03 '16 12:06 Alicole

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!

abbycabs avatar Jun 03 '16 16:06 abbycabs

@acabunoc -- Thanks it would be great if this was closed soon, as it would help prevent any issues with url path inconsistencies.

Alicole avatar Jun 03 '16 16:06 Alicole

@Alicole I'll make this a priority!

abbycabs avatar Jun 03 '16 16:06 abbycabs

on review #212

josmas avatar Oct 27 '16 17:10 josmas