Checklinks Action Documentation
This is the documentation page for the checklinks action.NOTE
This feature is available since:
WikkaWiki 1.4.0
WikkaWiki 1.4.0
See also:
Development: ChecklinksAction.Documentation
Short description
This administration tool checks the validity of hyperlinks on some or all of the wiki pages and displays a report of broken links.Parameters
name | type | required? | default | description |
---|---|---|---|---|
scope | string | optional | user | Allowed values are 'page' (check only this page), 'user' (check all pages owned by current user) and 'all' (check all pages for which current user has ACL-read-access) |
sort | string | optional | tag | Allowed values are 'tag' (sort on page tag), 'type' (sort on link type) and 'cnt' (sort on occurences count) |
opts | string | optional | Options: any combination of 'i' (internal=do not check external web pages), 't' (terse=show only summary report) and 'w' (check page tag format, i.e. that it is formatted as a valid WikiWord) |
Long description
Link checkers are a standard administration tool for webmasters and can be run on a wiki site. However, a standard link checker has the following drawbacks when used with WikkaWiki:- as it is not a registered wiki user, it can be denied access to ACL-protected pages
- it checks older versions of each page, adding significantly to execution time
- it is not always able to check for 'file://' hyperlinks
- it cannot point out non-existent (i.e. wanted) wiki pages, as the corresponding hyperlink points to an (existing) WikiWord/edit page tag
This action is a link checker adapted to the wiki context. It goes over the latest version of all wikka pages accessible in read mode to the current user and checks for the validity of various types of hyperlinks appearing on these pages.
Link categories checked are:
- intra-wiki (page) links ;
- inter-wiki links ;
- other web pages hosted on the same or a different server ;
- files on a local or shared directory ;
- actions.
When run by a Wiki Admin with a scope="all" parameter value, it checks the integrality of the wiki content.
Usage
{{checklinks [scope="page"] [sort="type"] [opts="[i][t][w]"]}}
Example
Let's create on purpose on this page a NonExistentWikiPageLink, a non-existent external link and a non-existent file link.The output of {{checklinks scope="page"}} would look like:
Link check summary
Link type | Valid links # | Broken links # |
---|---|---|
Action | 1 | 0 |
External | 1 | 1 |
Inter-wiki | 0 | 0 |
Wiki page | 3 | 1 |
File | 0 | 1 |
Total | 5 | 3 |
Detailed report
Link type | Page name | Link value | Error message | Occurences |
---|---|---|---|---|
File | ChecklinksActionInfo | ./files/nonexistentfile.abc | File not found | 1 |
External | ChecklinksActionInfo | http://www.nonexistentdomain.org/foo.htm | Not Found | 1 |
Wiki page | ChecklinksActionInfo | NonExistentWikiPageLink | Page non-existent | 1 |
To-do, bugs and limitations
- action does not check anchor-based links inside a page.
- action does not handle relative HTTP redirections (e.g. Location: ../foo.php in the HTTP reply header).
- execution time could be a limitation on a large wiki, especially when many external links are involved. Indeed, blocking socket calls are used, and neither multithreading nor parallelization speeds up the processing, so the performance of the external link checking engine is significantly lower than that of dedicated tools.
Other considerations
- the 'non-existent Wiki page' feature is somehow redundant with the WantedPages action. In order to avoid a double counting of non-existent pages, the action ignores all | Wantedpages actions.
- credit is given to steven (at) haryan.to and to carinridge (at) hotmail.com for part of the external link checking code.
Author
DomBonjCategoryEN