Topic on Project:Support desk

The revision #27930 of the page named "Main Page" does not exist.

11
206.212.89.232 (talkcontribs)

Hello,

I inherited a wiki when taking over http://japan-legend.com/wiki but the Wiki is broken. When I try to access any page I get an error similar to:

The revision #27930 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

If someone could point me in the right direction to getting this fixed I'd be grateful.

Kind Regards,

Brian

87.123.4.36 (talkcontribs)

Hi Brian!

MediaWiki has a certain structure inside the database. There are the database tables "page", "revision" and "text". These contain the data needed to display the content of a certain page. The introduction on Manual:page table explains, how they are connected.

You are most likely missing the according row(s) inside the revision table. According to what I found in your wiki, there should be 27940 rows inside the revision table. Without these rows it will nearly be impossible to make the wiki work again.

206.212.89.232 (talkcontribs)

Hello again,

I've checked the database:

Showing rows 0 - 29 (27718 total, Query took 0.0058 sec)

From `wiki_revision`

Showing rows 0 - 29 (21538 total, Query took 0.0058 sec)

From `wiki_page`

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 sec)

FROM `wiki_text`

Time to check the backup files I was given :/

206.212.89.232 (talkcontribs)

Showing rows 0 - 29 (2187 total, Query took 0.0011 sec)

FROM `wiki_text`

I've retored that table. But still am getting the same error.

87.123.4.36 (talkcontribs)

Please check the value of the table prefix in $wgDBprefix! The entries in your wiki_page table are found, but is this really the table which MediaWiki is using? All the table names are starting with "wiki_", but is $wgDBprefix set to "wiki" as well?

The problem is not caused by missing rows in the text table (although your number there is suspiciously low as well). But the problem are missing rows in the revision table. The entries in your page table reference revisions up to rev_id 27940. At this point the complete revision table will have an entry with rev_id = 27940 as highest value. The number of rows in that table should be around 27940 - it might be a bit lower, because MediaWiki can be used to remove certain rows manually, but it should be around that number of rows.

206.212.89.232 (talkcontribs)

$wgDBprefix         = "wiki_";

I'm going to check the backup files I have and create another database and see if I can get the numbers like what you suggest.

206.212.89.232 (talkcontribs)

FYI I was trying to run php rebuildall.php and it gives the following error at the very end:

Refreshing links tables.

Starting from page_id 1 of 21705.

A database query error has occurred.

Query: INSERT  INTO `wiki_job` (job_cmd,job_namespace,job_title,job_params,job_id,job_timestamp,job_sha1,job_random) VALUES ('refreshLinks','6','Kaleido_star_01.jpg','a:6:{s:5:\"table\";s:10:\"imagelinks\";s:9:\"recursive\";b:1;s:13:\"rootJobIsSelf\";b:1;s:16:\"rootJobSignature\";s:40:\"6d320a97f3b8a1ac118d53b52ea29fe9e2e54bb4\";s:16:\"rootJobTimestamp\";s:14:\"20161027105345\";s:9:\"requestId\";s:24:\"ed2964124e31245c20ea82c0\";}',NULL,'20161027105345','8szsawjiusjo41jixnxaeqi2wur6wvj','971716753')

Function: JobQueueDB::doBatchPush

Error: 1048 Column 'job_id' cannot be null (localhost)

87.123.4.36 (talkcontribs)

The rebuildall.php cannot help you. THis script cannot be used to recreate missing entries in the page, revision or text tables.

The error "Column 'job_id' cannot be null" shows that inside the job table, the column job_id does not have the auto_increment information set. This can be fixed by making this column an auto_increment. However, it will not solve the issue with missing revisions.

Do you not have a working backup of the database? Like an SQL file of it, which someone once exported?

87.123.4.36 (talkcontribs)

> The rebuildall.php cannot help you.

...except you have menawhile imported a backup and now the revision errors are solved.

46.7.34.82 (talkcontribs)

I've restored a different copy of the database. I've still the same error.

87.123.39.2 (talkcontribs)

What you have used now obviously suffers from the same problem as the one, which you used in your first try...

Have you used a different backup for that restore process? Or do you still have another one?

Reply to "The revision #27930 of the page named "Main Page" does not exist."