Validate External Links: Difference between revisions

the exception list is now wikified
(moved content here (and expanded on it) from Current events)
 
(the exception list is now wikified)
Line 4: Line 4:
While MediaWiki makes it easy to find bad links to pages on our own wiki, marking them in red and providing tools like [[Special:Wantedpages|Wantedpages]], there is no automatic check of external links. MediaWiki compiles external links into a table, but it does not ping the URLs to see if they give any response. The most you are allowed to do is [[Special:LinkSearch|search]] through the links table, and even that isn't implemented well. Over the years, many links on our wiki have gone dead as the Web has changed and various file hosts have gone out of business.
While MediaWiki makes it easy to find bad links to pages on our own wiki, marking them in red and providing tools like [[Special:Wantedpages|Wantedpages]], there is no automatic check of external links. MediaWiki compiles external links into a table, but it does not ping the URLs to see if they give any response. The most you are allowed to do is [[Special:LinkSearch|search]] through the links table, and even that isn't implemented well. Over the years, many links on our wiki have gone dead as the Web has changed and various file hosts have gone out of business.


So here's how ValExtLinks helps with this: a couple times a day, a script written by [[User:Admin|Alloc]] dumps the wiki's external links table to [http://wiki.oni2.net/w/extlinks.csv this location]. Val, which runs on Iritscen's computer once a day, then walks through the table and looks for URLs that return problematic codes such as 404. It also detects other lesser problems with links. Suggestions are given for fixing these links.
So here's how ValExtLinks helps with this: a couple times a day, a script written by [[User:Admin|Alloc]] dumps the wiki's external links table to [http://wiki.oni2.net/w/extlinks.csv this location]. Val, which runs on Iritscen's computer once a day, then walks through the table and looks for URLs that return problematic codes such as 404. It also detects other lesser problems with links. Val also makes suggestions for fixing bad links.


==How to fix bad links==
==How to fix bad links==
Line 14: Line 14:
**Sometimes an "external internal" may seem to be necessary; for instance you may wish to link to a specific version of a page, which used to require putting the full URL, [http://wiki.oni2.net/w/index.php?title=Oni&oldid=7685 like this]. In fact, there's no need to link to any page at all, as the "ID" of an edit, like the one you see in that sample URL, is unique wiki-wide. All you need to do is supply the revision ID to the special Permalink page like this — [[Special:Permalink/7685]] — and you're done.
**Sometimes an "external internal" may seem to be necessary; for instance you may wish to link to a specific version of a page, which used to require putting the full URL, [http://wiki.oni2.net/w/index.php?title=Oni&oldid=7685 like this]. In fact, there's no need to link to any page at all, as the "ID" of an edit, like the one you see in that sample URL, is unique wiki-wide. All you need to do is supply the revision ID to the special Permalink page like this — [[Special:Permalink/7685]] — and you're done.
**Sometimes you need to link to a diff between two revisions of a page, or between two different pages. In this case you plug the old and new revision numbers into the special Diff page like this — [[Special:Diff/21491/21492]] (no need for page names as the revision IDs are unique, as explained above).
**Sometimes you need to link to a diff between two revisions of a page, or between two different pages. In this case you plug the old and new revision numbers into the special Diff page like this — [[Special:Diff/21491/21492]] (no need for page names as the revision IDs are unique, as explained above).
*Some links simply have to be written the way that they are, and some links return error codes but actually work fine. These links can be listed in the [http://iritscen.oni2.net/val/exceptions.txt exceptions file] in order to hide them in future reports. Contact Iritscen to have new exceptions added to this list.
*Some links simply have to be presented the way that they are, and some links return error codes but actually work fine. These links can be listed in the [[/Exceptions|exceptions list]] in order to hide them in future reports.


==Coming features==
==Coming features==
*A wikified exceptions list, so anyone can edit it without having to contact Iritscen.
*It seems that many external links no longer display the content that they were intended to display. In many cases, web sites are silently redirecting the user to their main page without using the appropriate code that indicates the content was not found. Only visual inspections of the pages can catch these issues. Once we have dealt with the low-hanging fruit of pages that return "NG" codes, the screenshot feature in the script will be activated, which will allow us to easily confirm if the "OK" links (and snapshots from the Internet Archive) are actually loading the intended page.
*It seems that many external links no longer display the content that they were intended to display. In many cases, web sites are silently redirecting the user to their main page without using the appropriate code that indicates the content was not found. Only visual inspections of the pages can catch these issues. Once we have dealt with the low-hanging fruit of pages that return "NG" codes, the screenshot feature in the script will be activated, which will allow us to easily confirm if the "OK" links (and snapshots from the Internet Archive) are actually loading the intended page.


*Over time, the exceptions file should be audited so it doesn't acquire [[wikt:cruft|cruft]]. Val will mention URLs in the list that aren't in extlinks.csv anymore, and URLs that returned different codes from what was expected in the file.
*Over time, the exceptions list should be audited so it doesn't acquire [[wikt:cruft|cruft]]. Val needs to mention URLs in the list that aren't in extlinks.csv anymore, and URLs which returned different codes from what was expected.


*Val will eventually expand and test the interwiki links. Currently there is no way to know if they've gone bad.
*Val will eventually expand and test the interwiki links. Currently there is no way to know if they've gone bad.