Page MenuHomeMiraheze

Cannot edit some pages as IncompleteRevisionException
Closed, ResolvedPublic

Description

When I try to submit in https://rs.miraheze.org/w/index.php?title=Module:Catnav&action=submit
A exception is thrown with the following message:
[c8c94d9e83c6fc67e978f0d4] 2022-08-17 14:54:17: 类型“MediaWiki\Revision\IncompleteRevisionException”的致命异常

If I delete and undelete that page and edit again, the same issue happens.

Event Timeline

MediaWiki\Revision\IncompleteRevisionException: rev_page field must not be 0!
from /srv/mediawiki/w/includes/Revision/RevisionStore.php(415)
#0 /srv/mediawiki/w/includes/Revision/RevisionStore.php(476): MediaWiki\Revision\RevisionStore->failOnEmpty(integer, string)
#1 /srv/mediawiki/w/includes/Storage/PageUpdater.php(1330): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#2 /srv/mediawiki/w/includes/Storage/PageUpdater.php(909): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment)
#3 /srv/mediawiki/w/includes/EditPage.php(2368): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#4 /srv/mediawiki/w/includes/EditPage.php(1694): EditPage->internalAttemptSave(array, boolean, boolean)
#5 /srv/mediawiki/w/includes/EditPage.php(671): EditPage->attemptSave(array)
#6 /srv/mediawiki/w/includes/actions/EditAction.php(71): EditPage->edit()
#7 /srv/mediawiki/w/includes/actions/SubmitAction.php(38): EditAction->show()
#8 /srv/mediawiki/w/includes/MediaWiki.php(543): SubmitAction->show()
#9 /srv/mediawiki/w/includes/MediaWiki.php(321): MediaWiki->performAction(Article, Title)
#10 /srv/mediawiki/w/includes/MediaWiki.php(912): MediaWiki->performRequest()
#11 /srv/mediawiki/w/includes/MediaWiki.php(563): MediaWiki->main()
#12 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#13 /srv/mediawiki/w/index.php(46): wfIndexMain()
#14 {main}

Can you please confirm the issue is still happening? I can not seem to find any page id that is zero in the database, so not sure why this is happening.

> SELECT * from revision WHERE rev_page = 0;
Query OK, 0 row(s) affected
> SELECT * FROM page WHERE page_id = 0;
Query OK, 0 row(s) affected

> SELECT * FROM page WHERE page_id = 244;
stdClass Object
(
    [page_id] => 244
    [page_namespace] => 828
    [page_title] => Catnav
    [page_restrictions] =>
    [page_is_redirect] => 0
    [page_is_new] => 1
    [page_random] => 0.41609727617
    [page_touched] => 20220817151215
    [page_links_updated] => 20220824200725
    [page_latest] => 22494
    [page_len] => 1953
    [page_content_model] => Scribunto
    [page_lang] =>
)

> SELECT * from revision WHERE rev_page = 244;
stdClass Object
(
    [rev_id] => 408
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715072757
    [rev_minor_edit] => 0
    [rev_deleted] => 0
    [rev_len] => 1045
    [rev_parent_id] => 0
)
stdClass Object
(
    [rev_id] => 410
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715074614
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1183
    [rev_parent_id] => 408
)
stdClass Object
(
    [rev_id] => 411
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715080703
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1351
    [rev_parent_id] => 410
)
stdClass Object
(
    [rev_id] => 412
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715082642
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1348
    [rev_parent_id] => 411
)
stdClass Object
(
    [rev_id] => 413
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715082716
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1348
    [rev_parent_id] => 412
)
stdClass Object
(
    [rev_id] => 414
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170715125445
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1314
    [rev_parent_id] => 413
)
stdClass Object
(
    [rev_id] => 569
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20170805051042
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1420
    [rev_parent_id] => 414
)
stdClass Object
(
    [rev_id] => 988
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20171105002555
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1449
    [rev_parent_id] => 569
)
stdClass Object
(
    [rev_id] => 1038
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20171229112012
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1473
    [rev_parent_id] => 988
)
stdClass Object
(
    [rev_id] => 1039
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20171229112242
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1481
    [rev_parent_id] => 1038
)
stdClass Object
(
    [rev_id] => 1050
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20171229113844
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1487
    [rev_parent_id] => 1039
)
stdClass Object
(
    [rev_id] => 1896
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20180214035554
    [rev_minor_edit] => 0
    [rev_deleted] => 0
    [rev_len] => 1718
    [rev_parent_id] => 1050
)
stdClass Object
(
    [rev_id] => 5684
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20190913153631
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1714
    [rev_parent_id] => 1896
)
stdClass Object
(
    [rev_id] => 5689
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20190913154121
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1714
    [rev_parent_id] => 5684
)
stdClass Object
(
    [rev_id] => 10255
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20200920080713
    [rev_minor_edit] => 0
    [rev_deleted] => 0
    [rev_len] => 1871
    [rev_parent_id] => 5689
)
stdClass Object
(
    [rev_id] => 16849
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20211102123343
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1947
    [rev_parent_id] => 10255
)
stdClass Object
(
    [rev_id] => 16850
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20211102123446
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1965
    [rev_parent_id] => 16849
)
stdClass Object
(
    [rev_id] => 22494
    [rev_page] => 244
    [rev_comment_id] => 0
    [rev_actor] => 2
    [rev_timestamp] => 20220816095947
    [rev_minor_edit] => 1
    [rev_deleted] => 0
    [rev_len] => 1953
    [rev_parent_id] => 16850
)

Yes it still happens. I tried to edit again that page just now and the same error was thrown.

Yes it still happens. I tried to edit again that page just now and the same error was thrown.

I just tested it myself, and it does save. So I am not sure what your issue is?

I just tested again and the same issue raises.

图片.png (211×1 px, 27 KB)

When I try to submit this page on my wiki without provide a edit summary, the same isuue happens.

Perhaps https://phabricator.wikimedia.org/T304559?

Does this still happen? I upgraded MediaWiki today hoping this would be resolved.

SolidBlock claimed this task.

It does not happen now.

It does not happen now.

Glad it is resolved. Thank you for letting us know.