Manual:fixMergeHistoryCorruption.php
Appearance
| MediaWiki version: | ≥ 1.37 |
| MediaWiki file: fixMergeHistoryCorruption.php | |
|---|---|
| Location: | maintenance/ |
| Source code: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| Classes: | FixMergeHistoryCorruption |
Details
[edit]fixMergeHistoryCorruption.php is a maintenance script to clears rows of pages corrupted by MergeHistory, those pages exist but have no visible revision.
These pages are completely inaccessible via the UI due to revision/title mismatch exceptions in RevisionStore and elsewhere.
These are rows in page table that have page_latest entry with corresponding rev_id but no associated rev_page entry in revision table.
Such rows create ghost pages because their page_latest is actually living on different pages (which possess the associated rev_page on revision table now).
Options/Arguments
[edit]| Option | Description | Required? |
|---|---|---|
| --ns | Namespace to restrict the query | Optional |
| --dry-run | Run in dry-mode which does not delete anything | Optional |
| --delete | Actually delete the found rows | Optional |
Usage
[edit]php maintenance/run.php fixMergeHistoryCorruption [ --ns| --dry-run| --delete ]
Terminal
$ php maintenance/run.php fixMergeHistoryCorruption --delete Deleting Foo with page_id: 46 Updating page_id 134 to page_latest 465 Updated 1 row(s), deleted 1 row(s)
In MediaWiki version 1.43.6 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php instead of php maintenance/run.php scriptName.