PoeticMediaLab / Lacuna

Lacuna: Digital Annotation for Teaching and Learning
http://www.lacunastories.com
GNU General Public License v2.0
36 stars 20 forks source link

Paging through annotations fails when document is visited from annotation-specific URL #211

Open codyml opened 6 years ago

codyml commented 6 years ago

When an annotation on a document is visited using its direct link (document URL with ?id=XXX), the pager buttons don't work right away and cause the attached error. Neither of the "None," "Mine," or "All" buttons are selected either. Selecting one of these buttons makes paging through annotations work again.

js_NnoPHN7yKs4UpwICVDR-tCcYvswoIoRqJrkmQchqAhI.js:603 Uncaught TypeError: Cannot read property 'highlights' of undefined
    at PTController.check_if_annotation_visible (js_NnoPHN7yKs4UpwICVDR-tCcYvswoIoRqJrkmQchqAhI.js:603)
    at HTMLDocument.<anonymous> (js_NnoPHN7yKs4UpwICVDR-tCcYvswoIoRqJrkmQchqAhI.js:532)
    at HTMLDocument.dispatch (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:3)
    at HTMLDocument.i (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:3)
    at Object.trigger (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:3)
    at HTMLDocument.<anonymous> (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:3)
    at Function.each (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:2)
    at $.fn.init.each (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:2)
    at $.fn.init.trigger (js_9ghOzpywkUSGMtnNnMGS7mA2XEN0DUwNX9wpktc9bCo.js:3)
    at Filters.Annotator.Plugin.Filters.Filters.pagerClick (js_MW6BUpL3plJBXcwx5KHY0doSU7EhY8GRrdua4rmUGOw.js:10424)