Bug #12699
closedHypothes.is not annotating PDFs in Media Library
0%
Description
Related issues here:https://redmine.gc.cuny.edu/issues/11276 and here: https://redmine.gc.cuny.edu/issues/8944.
Using the Hypothes.is plugin, I'm not able to annotate PDFs in Media Library even when I have checked this option in Hyptohes.is plugin configuration. There are currently no issues with getting H to load on the parts of the website like pages and posts, just having issues with PDFs in the media library.
Course website: https://engl326spring20.commons.gc.cuny.edu
Sample PDF page (with plugin not working): https://engl326spring20.commons.gc.cuny.edu/wp-content/blogs.dir/11194/files/2020/01/stavans_intro.pdf
My workaround has been to manually add the prefix: https:via.hypothes.is (also known as the "via" method) which automatically loads the tool on a webpage. Having to add this prefix to all the PDF URL links has been time consuming, though, and I hope to get some info as to why the PDFs won't seem to load the tool. Example of via method usage: https://via.hypothes.is/https://engl326spring20.commons.gc.cuny.edu/wp-content/blogs.dir/11194/files/2020/03/alma.pdf
Files
Updated by Laurie Hurson over 4 years ago
Hi Filipa,
Thanks for the report and sorry this isn't working. I re-created the issue when i tried it on my test site here: https://coursetest.commons.gc.cuny.edu/hypoth-pdf-testing/
Hypothesis wont work on PDFs on private sites but I saw that your site and my test site (above) are both public so the plugin should be working on our PDFs.
I wonder if this issue might be caused by the link structure that refers the plugin to the media library where pdfs are stored, detailed in ticket #9120 -- https://redmine.gc.cuny.edu/issues/9120
If so, developers will know more about how to fix the link structure.
Updated by Boone Gorges over 4 years ago
- Category name changed from Teaching to WordPress Plugins
- Status changed from New to Reporter Feedback
Thanks to both of you for your detailed report.
It looks like there was a syntax error in the JS shim I introduced in #9120. I've just fixed it and deployed the fix to the production site. Could you please test to see whether it's behaving as expected? (I'm not 100% sure of the expected behavior.)
Updated by Laurie Hurson over 4 years ago
- File hypoth via link.png hypoth via link.png added
Hi Boone,
Thanks for this. It seems like the hypothesis plugin is still not working on PDFs in the media library.
I de/re-installed the plugin, reset plugin settings, recreated the pdf/media library link, and updated the page. Still no hypothesis tool on the PDF. The plugin settings indicate that the tool should be activated to "work on pdfs in the media library". So it should create a pop-out right sidebar for annotation (screenshot attached of correct function using via link).
Is it possible the Commons is blocking this sidebar somehow?
Updated by Boone Gorges over 4 years ago
It's working for me at https://via.hypothes.is/https://coursetest.commons.gc.cuny.edu/wp-content/blogs.dir/2976/files/2019/08/Manovich-NewMedia.pdf - but it's minimized by default. See the arrow at the very upper right of the screenshot. Are you seeing something similar?
Updated by Laurie Hurson over 4 years ago
This works because it contains the link extension "via.hypothesis".
If you remove the extension it does not work, but it should. The plugin is supposed to run the tool on PDFs from the media library. Using the plugin, the site admin does not need to manually add the via link extension when linking to pdfs in media library.
When you view the pdf through the page on the commons with no link extension hypothesis sidebar should appear but it doesn't. https://coursetest.commons.gc.cuny.edu/hypoth-pdf-testing/
It's like the commons is blocking the sidebar, or not recognizing that the plugin is activated on that site w access to the media library.
Updated by Boone Gorges over 4 years ago
When I click on the "What is New Media?" link at https://coursetest.commons.gc.cuny.edu/hypoth-pdf-testing/, I am led to the URL https://via.hypothes.is/https://coursetest.commons.gc.cuny.edu/wp-content/blogs.dir/2976/files/2019/08/Manovich-NewMedia.pdf, where I'm able to use the Hypothesis tools.
Can you explain what you mean by "the extension 'via.hypothesis'"? Does this mean the URL prefix? To my knowledge, there's no way to use Hypothesis on Commons PDFs unless you're viewing them via a via.hypothes.is URL.
When you say "when you view the pdf through the page on the commons" do you mean that the PDF should be embedded on the page? I'm afraid I don't fully understand the expected behavior.
Updated by Laurie Hurson over 4 years ago
Hi Boone,
I am sorry for the confusion. I am able to see the pdf with hypothesis tools now but only after I cleared my cache. Dumb mistake on my part. Looks like your fix worked and I just need more coffee.
Thanks for your help.
Updated by Boone Gorges over 4 years ago
- Status changed from Reporter Feedback to Resolved
- Target version set to 1.16.10
Not a dumb mistake, just a stubborn browser cache :-D Glad it's working!
Updated by Filipa Calado over 4 years ago
It's working for me, now! I was testing this across browsers yesterday (was having some issues last night getting it to work on Firefox, though it was working in Chrome and Safari) but it seems to be all good when I cleared my cache re-started my browser this morning.
Thank you Boone and Laurie so much for your help. My students also thank you!
Updated by Boone Gorges over 4 years ago
Awesome! Thanks for circling back, Filipa!
Updated by Matt Gold over 4 years ago
Thanks to you all for working through this!