Skip to content

Document plugin - add error checking for collected links #251

Closed
@gergely-ujvari

Description

@gergely-ujvari

Currently, when the document plugins collects all links in the getLinks() function it does not check if these links are not head when calling the _absoluteUrl() for them.

Take these page as an example: http://sportgeza.hu/sport/vivovb/2013/08/10/iszonyu_fajdalmas_vereseg_a_romanoktol/

It throws back the following error:

GET http://sportgeza.hu/copyright/ 404 (Not Found) jquery-1.10.2.js?91515770:6569
jQuery.extend.buildFragment jquery-1.10.2.js?91515770:6569
jQuery.extend.parseHTML jquery-1.10.2.js?91515770:540
jQuery.fn.jQuery.init jquery-1.10.2.js?91515770:150
jQuery jquery-1.10.2.js?91515770:63
Annotator.Plugin.Document.Document._absoluteUrl annotator.document.js?d8714605:296
Annotator.Plugin.Document.Document._getLinks annotator.document.js?d8714605:209
(anonymous function) annotator.document.js?d8714605:15
Annotator.Plugin.Document.Document.getDocumentMetadata annotator.document.js?d8714605:95
(anonymous function) annotator.document.js?d8714605:15
Annotator.Plugin.Document.Document.pluginInit annotator.document.js?d8714605:45
Annotator.addPlugin annotator.js?c4672558:1353
Annotator.Host.Host._setupXDM host.js?9bed4e07:103
(anonymous function) host.js?9bed4e07:60
jQuery.event.dispatch jquery-1.10.2.js?91515770:5095
elemData.handle

And of course it is the page which gives the wrong metadata, here:
<meta name="copyright" content="http://sportgeza.hu/copyright/" />

But we should not throw errors in these cases (as I see it then aborts the whole document scanning).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions