- Veterans should not encounter broken links.
- With hundreds of editors, broken links are inevitable.
There are 3 concurrent strategies to prevent broken links.
- CMS Pre-save Validation There are several checks performed on links as they are saved that are either cleaned up automatically, or prevent saving the revision.
- CMS Post-save Warning: Node Link Report
- Front End Link Checking
The Node Link Report module tests all links from a page rendered to the anonymous user. It looks for broken links, links to pages that are unpublished and links that may have accessability issues. Cons:
- Cached, so it only updates on node save or 24hr, whichever comes first.
- Some external domains are blocked by the VA network, so there are links that get falsely reported as broken. They can be exempted here (/admin/config/content/node_link_report) once they have been confirmed to be legitimate.
- Some external sites block the useragent that we use to check the link, which results in a falsely reported broken link. These can also be exempted.
The link checking on the front end happens during the content-build in Content-Build repo. Only internal links are checked. If more than 10 broken links are found, the content release is considered a failure and does not occur. CMS team is to respond and remedy if this happens. The broken links are reported to both the #vfs-platform-builds and #content-broken-links channels in Slack.
CMS Team support triages reported broken links following a defined process.
Notes:
- Only schemeless links (lacking https://) are considered internal.