WMS Linkchecker

We’ve needed to have a linkchecker in place on the WMS for a while, but for technical and time reasons we’ve been unable to implement it until now. The good news is that the Drupal community already have a very good linkchecker module, which we will be pushing out to all sites in the near future.

The module we are using is called, unsurprisingly linkchecker and provides site managers with three things:

  • A Broken Links report which usually exists on the Reports menu, but we are moving to the Content menu as our site managers don’t have access to Reports.
  • A Broken Links tab on user profiles which provides a quick way to get broken links for content only you have created.
  • Messages at the top of node edit pages listing broken links in that node.

The module is very configurable, so here are some of the decisions we’ve made for configuration. Note that we may change some of these decisions based on feedback we receive:

  • Only scan page and block content types
  • Check both internal and external liks
  • Re-check every 4 weeks
  • Do not auto-updated 301s (see below)
  • Only provide reporting on the site. We plan to add email reporting as a future enhancement.

A note on status codes: The linkchecker will report various status codes for links it considers broken. The code for a page not found is 404, but other codes can be returned too, such as:

  • 500 – The server encountered an error
  • 503 – Service currently unavailable
  • 504 – Timeout
  • 401 – Unauthorized (probably requires authentication)
  • 403 – Forbidden
  • 301 – Moved permanently

In the case of 301, linkchecker has the ability to automatically fix the link to whatever it was moved to. This is a nice feature, but it makes us a bit nervous so we’re leaving it off for now until we can test that it doesn’t break anything. 301 responses can be ignored, but it is better to fix them.

 

2 Responses to “WMS Linkchecker”

  1. Victor Chisholm says:

    “A Broken Links tab on user profiles which provides a quick way to get broken links for content only you have created.

    What defines content I have created, vs other content? Is it a function of who last edited the node? Have you thought of putting some explanation on the top of this report/webpage to point out that it isn’t complete, to the extent it might/does not include broken links on content I have not created?

    • Mark says:

      Content you have created is content that was originally created by you, even if it was edited by someone else after that. This is why it appears on your user page. The usefulness of that particular report varies depending on how the site is managed. In a lot of cases it will be more useful to use the central broken links report on the content menu which contains broken links for all content.

Blog authors are solely responsible for the content of the blogs listed in the directory. Neither the content of these blogs, nor the links to other web sites, are screened, approved, reviewed or endorsed by McGill University. The text and other material on these blogs are the opinion of the specific author and are not statements of advice, opinion, or information of McGill.