Manual:FindAnomalies.php

Note: The findAnomalies.php script is no longer included in recent releases. See source code below if you want to use it.

findAnomalies.php is a maintenance script that searches for missing revisions and archive rows. The plmra mode is useful for situations in which, for a bunch of pages, you get an error of "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." You can find all the pages that have that error.

Adding a --fix option for plmr would be a simple matter of finding the most recent revision for a page and setting to that. More simply, one could just use attachLatest.php.

rmra mode
$ php findAnomalies.php --mode=rmra --ranges Reading the revision table... Reading the archive table... Reading the page table...

Here are the revision IDs of the revisions missing from both the revision and archive tables: 557		1 row;     1 anomalies found so far 19195		1 row;     2 anomalies found so far 20515		1 row;     3 anomalies found so far 20517		1 row;     4 anomalies found so far 20519		1 row;     5 anomalies found so far 20530		1 row;     6 anomalies found so far 23454		1 row;     7 anomalies found so far 23473		1 row;     8 anomalies found so far 23475		1 row;     9 anomalies found so far 27001-27030	30 rows;   39 anomalies found so far 27061-27226	166 rows;  205 anomalies found so far 27228-27252	25 rows;   230 anomalies found so far 27254-27562	309 rows;  539 anomalies found so far 28828		1 row;     540 anomalies found so far 29303		1 row;     541 anomalies found so far 29305		1 row;     542 anomalies found so far 31735-31736	2 rows;    544 anomalies found so far 32414		1 row;     545 anomalies found so far 32545		1 row;     546 anomalies found so far 32554		1 row;     547 anomalies found so far 32702		1 row;     548 anomalies found so far 32721		1 row;     549 anomalies found so far 32840		1 row;     550 anomalies found so far 32951		1 row;     551 anomalies found so far 32976		1 row;     552 anomalies found so far 33007		1 row;     553 anomalies found so far 33044		1 row;     554 anomalies found so far 33079		1 row;     555 anomalies found so far 33170		1 row;     556 anomalies found so far 33200		1 row;     557 anomalies found so far 33263		1 row;     558 anomalies found so far 33332		1 row;     559 anomalies found so far 33381		1 row;     560 anomalies found so far 33774		1 row;     561 anomalies found so far

561 anomalies found

plmra mode
$ php findAnomalies.php --mode=plmra Reading the revision table... Reading the archive table... Reading the page table...

Here are the pages that have no revision nor archived revision for their page_latest: Cambodia Cambridge,_Massachusetts Campaign_finance_law Campus_libertarian Canada [... etc., etc. ...] Drug_test Cannibalism Genital_integrity French_économistes Frédéric_Bastiat

178 anomalies found