Extension:SaneCase

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
SaneCase
Release status: beta
Implementation User interface
Description Automatic correct case mistakes.
Author(s) Martin Tournoij (Carpetsmokertalk)
Latest version 1.0 (2015-02-02)
MediaWiki 1.25+
PHP 5.4+
License MIT License
Download
Translate the SaneCase extension if it is available at translatewiki.net
Check usage and version matrix.

The SaneCase extension automatic corrects case mistakes. For example if the page Test exists, and someone goes to TEST, they will be automatically redirected to Test with a 301.

This is really much more sane than the default case-sensitivity.

This implements the "Auto redirect option" from Case sensitivity of page names:

Automatically redirect to a page that has same spelling but different capitalization (have the computer do the disambiguation pages when a spelling doesn't match an existing page)

Negatives: Performance and possible search engine duplicate content penalties caused by MediaWiki's redirection mechanism.

My response to that:

  • It's one very simple query, the performance hit should be almost unnoticeable for most sites.
  • The user having to figure out the correct URL is often more of a performance hit, not to mention a huge usability hit. Plus these are the sort of responses that can be cached very well in Varnish or whatnot.
  • A 301 "Moved Permanently" redirect should be fine for search engines.

Installation[edit]

  • Download and place the file(s) in a directory called SaneCase in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'SaneCase' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.