I activated the debug to obtain more detail I found the following lines:
[DBQuery] wiki SELECT / * MediaWiki \ Revision \ RevisionStore :: newNullRevision * / page_latest FROM page
WHERE page_id = '567' LIMIT 1 FOR UPDATE
[DBQuery] wiki SELECT / * MediaWiki \ Revision \ RevisionStore :: fetchRevisionRowFromConds * / rev_id, rev_page, rev_timestamp, rev_minor_edit, rev_deleted, rev_len, rev_parent_id, rev_sha1, rev_comment AS rev_comment_text
, NULL AS` rev_comment_data`, NULL AS rev_comment_cid
, rev_user, rev_user_text, NULL AS rev_actor
, page_namespace, page_title, page_id, page_latest, page_is_redirect, page_len, user_name FROM` revision` INNER JOIN page
ON ((page_id = rev_page)) LEFT JOIN` user` ON ((rev_user ! = 0) AND (user_id = rev_user)) WHERE rev_id = '18294' LIMIT 1
[DBQuery] wiki SELECT / * MediaWiki \ Revision \ RevisionStore :: loadSlotRecords * / slot_revision_id, slot_content_id, slot_origin, slot_role_id, content_size, content_sha1, content_address, content_model FROM slots
INNER JOIN` content` ON ((slot_content_id = content_id)) WHERE slot_revision_id = '18294'
[DBQuery] wiki SELECT / * Wikimedia \ Rdbms \ Database :: ping * / 1 AS ping
[DBQuery] wiki ROLLBACK / * MWExceptionHandler :: rollbackMasterChangesAndLog * /
[exception] [84ce4d9d5080cde5574a7aee] /wiki/index.php?title=Special:MoverP%C3%A1gina&action=submit MediaWiki \ Revision \ IncompleteRevisionException from line 420 of / var / www / html / php72 / wiki / includes / Revision / RevisionStore. php: sha1 field must not be ''!
I checked in the database the table content with the following sentence:
SELECT * FROM wiki.content WHERE content_sha1 = '' OR content_sha1 = null;
And I found some records match the search filter.
I researched about the field and found
On the page Manual:Content_table you will find the description of the table and column:
content_sha1 -> Nominal hash of the content object (not necessarily of the serialized blob)
On the page "https://www.mediawiki.org/wiki/Multi-Content_Revisions/Database_Schema#content" gives a little more information:
Needed to re-calculate rev_sha1 for new revisions. Note: Should be nullable in case we want to switch to on-the-fly calculation to save space.
On the page Schema_Migration it says that for revision and file it should eventually be calculated from the blob if it is NULL.
Being an article, I did a test in which I copied the rev_sha1 into content_sha1 and the page transfer worked.
The steps I followed would be:
- Get from debug the rev_id and the content_id. The sentence from which I obtained it is similar to the one I obtained with the debug: SELECT slot_revision_id, slot_content_id, slot_origin, slot_role_id, content_size, content_sha1, content_address, content_model, content_id FROM
slots
INNER JOIN` content` ON ((slot_content_id = content_id )) WHERE slot_revision_id = '<rev_id>';
- Get the rev_sha1 with the statement: SELECT * FROM wiki.revision WHERE rev_id = '<rev_id>';
- Copy the rev_sha1 to content_sha1: UPDATE wiki.content SET content_sha1 = '<rev_sha1>' WHERE content_id = '<content_id>';
What is between <> are values that must be replaced.
Since I have several records of the content table with null value in content_sha1, you should see how to create a statement in which you review all the records, to obtain a global solution. I did not find an official solution yet, so I do not know if there is a php script that solves the problem, nor am I sure it is the correct solution.
I should do other tests to be sure. As soon as I can I do them and if I can create the global sentence I add it to the thread.