Project

General

Profile

Actions

Bug #12699

closed

Hypothes.is not annotating PDFs in Media Library

Added by Filipa Calado over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
WordPress Plugins
Target version:
Start date:
2020-04-24
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

hypoth via link.png (641 KB) hypoth via link.png Laurie Hurson, 2020-04-27 11:10 AM
Screenshot_2020-04-27_10-48-03.png (50.4 KB) Screenshot_2020-04-27_10-48-03.png Boone Gorges, 2020-04-27 11:48 AM
Actions #1

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.

Actions #2

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

Actions #3

Updated by Laurie Hurson over 4 years ago

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?

Actions #4

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?

Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions #8

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!

Actions #9

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!

Actions #10

Updated by Boone Gorges over 4 years ago

Awesome! Thanks for circling back, Filipa!

Actions #11

Updated by Matt Gold over 4 years ago

Thanks to you all for working through this!

Actions

Also available in: Atom PDF