mediawiki

Main Page error of MediaWiki


I have got this error of the maain page. How to fix it?

http://www.hippomocks.com/Talk:Main_Page

The revision #0 of the page named "Main Page" does not exist.
This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.

Solution

  • According to Mediawiki:

    Database inconsistencies occur when, for example, primary keys stored in other fields no longer point to a row that exists. This can happen after a database import ends prematurely, for example. In that case, page.page_latest might point to a revision that hasn't been imported, and users trying to read the page might get an error message stating "The revision #0 of the page named '[page name]" does not exist. This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log."

    The maintenance script findAnomalies.php can be used to find missing revisions. From CLI on your server, cd to the maintenance directory in your Mediawiki directory and run the script. e.g.:

    cd /var/www/html/wiki/maintenance
    php findAnomolies.php
    

    And try some extra stuff

    The error message you get sounds like in the page table, the entry of the according page points to a non-existing revision. This might be fixable by running the maintenance script attachLatest.php. This should make the page point to the newest revision again. This would be what I would try first.

    If that does not work and you in fact want to delete the page, I would try running the maintenance script nukePage.php. This script allows you to permanently(!) delete a page from the database. Afterwards you can use the script purgeOldText.php to delete unused rows from the text table.

    However, note that your database currently is in an inconsistent state; although the scripts I mentioned were partly written for situations of brokenness, there is no guarantee that they can solve this.