keep integration (4 widgets) working with Drupal 8 version (under development) of OpenScholar #6381#6486
keep integration (4 widgets) working with Drupal 8 version (under development) of OpenScholar #6381#6486
Conversation
|
@pdurbin I see you replace only colon char, what if you use this function to decode the whole string? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent |
|
@stamina84 thanks, I did think about that and could try it. At the moment the problem is that I don't have a way to test any changes I'm making with OpenScholar. This is because OpenScholar is hard coded to https://dataverse.harvard.edu as we've been discussing at #6381 (comment) |
|
Ok, thanks! Then lets Bilsi discuss it with Richard and see whats the next step. |
|
@pdurbin we are going to add a UI component to allow for this to be changed in a vsite, didn't realize there were so many DV installs live since Harvard mostly uses just the one. |
|
@pdurbin any way to validate the URL is actually a dataverse install? |
@rbran100 I usually tell people to got to the "version" API endpoint like https://demo.dataverse.org/api/info/version to check for what I guess I'd call a Dataverse "fingerprint". The output should look something like this (but not pretty printed): |
|
Thanks @rbran100 @stamina84, we'll remove this PR from our project board for now and will revisit once the new UI is in place in OS. |
|
I deployed this pull request my "dev2" server and tried all four widgets. I'm numbering them like this:
To make this a little more real, here's a screenshot of all four widgets on a vanilla HTML page: And here's the vanilla HTML I used: Now, on to OpenScholar. My observation is that the first two widgets don't work in OpenScholar without the fix in this pull request:
That said, I just got off a Zoom with @Bilsi where we talked about some strange behavior within OpenScholar. Namely:
In short, we are very aware of bugs in layout and such in the Drupal 8 version of OpenScholar that's still under development. These bugs should be expected when testing this pull request. |
djbrooke
left a comment
There was a problem hiding this comment.
Docs look good but someone else should look at the code!
|
@pdurbin Thanks for the testing, I did a tests too, and seems good for me. The query url is "decoded" and embed properly. I think it can be merge if you agree |
|
@pdurbin could you please inform me, if its available at https://dataverse.harvard.edu/dataverse/ install? This is what we are using primary, thanks! |
|
@stamina84 no, sorry, if you look at the bottom right corner of https://dataverse.harvard.edu (screenshot below), you'll see that it's still running 4.18.1. In #6506 we just started writing release notes for 4.19 and you are welcome to take a look and give feedback. This pull request will be part of 4.19. Our release and deploy process is something like this:
I hope this helps! Also, thanks for working on the following issue that I opened!
I know @jggautier @TaniaSchlatter and I have talked a lot about a related issue within Dataverse itself (users not knowing if they should enter "doi:" or not) but I can't find it right now. |
|
Ok, thanks for you information, its clear now! |


What this PR does / why we need it:
OpenScholar is upgrading to Drupal 8 and some of the Dataverse widgets aren't working. Maybe all.
Which issue(s) this PR closes:
Closes #6381
Special notes for your reviewer:
This is the tiniest fix I could make to fix a simple non-OpenScholar test I tried with these two variations:
original
<script src="http://localhost:8080/resources/js/widgets.js?persistentId=doi:10.5072/FK2/6YRLFR&dvUrl=http://localhost:8080&widget=iframe&heightPx=500"</script>encoded colons
<script src="http://localhost:8080/resources/js/widgets.js?persistentId=doi%3A10.5072/FK2/6YRLFR&dvUrl=http%3A//localhost:8080&widget=iframe&heightPx=500"</script>Suggestions on how to test this:
Does this PR introduce a user interface change?:
No. In fact, I didn't touch the Dataverse UI where people can copy with widgets from. The old URL with a colon (:) still seemed to work from my simply test.
Is there a release notes update needed for this change?:
Maybe something like "If you are running OpenScholar future version whatever, Dataverse widgets do not work. You must be running this version of Dataverse or newer."
Additional documentation:
With no changes to Dataverse, I was getting this error with the "encoded colons" version above:
With this pull request, it seems to work, at least for this widget: