Page MenuHomePhabricator

Cannot revert a structured data edit in Commons
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?: Returns an internal error. [7e825f2b-c0df-4234-be06-2fac381ffb7a] 2022-01-13 01:31:08: Fatal exception of type "LogicException"

What should have happened instead?: Reverted the edit with the edit summary I used

Workaround: Rollback still works, and using the structured data editor to revert also works too.

Event Timeline

I was able to reproduce the error, and also found another issue at the same time.

What happens?:
[708a286e-f0e1-42c5-b2aa-2d16cb97427f] 2022-01-13 01:34:02: Fatal exception of type "LogicException"

I couldn't even do it manually, since there were nothing on the "Structured data" tab

image.png (513×835 px, 30 KB)

But @Poyekhali were able to do it manually it seems from the History logs. but I still can't see it under the "Structured data" tab.

I tried rollbacking @Poyekhali's edit and then I saw the statements under the "Structured data" tab, but as soon as I rolled back myself, all statement disappeared again

What should have happened instead?:
The undo should have worked. I should be able to see the statement under the "Structured data" tab.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15

Legoktm subscribed.

Stacktrace:

Must call prepareContent() or prepareUpdate() before calling MediaWiki\Storage\DerivedPageDataUpdater::getRenderedRevision
from /srv/mediawiki/php-1.38.0-wmf.16/includes/Storage/DerivedPageDataUpdater.php(996)
#0 /srv/mediawiki/php-1.38.0-wmf.16/includes/Storage/DerivedPageDataUpdater.php(980): MediaWiki\Storage\DerivedPageDataUpdater->assertPrepared(string)
#1 /srv/mediawiki/php-1.38.0-wmf.16/includes/Storage/DerivedPageDataUpdater.php(1379): MediaWiki\Storage\DerivedPageDataUpdater->getRenderedRevision()
#2 /srv/mediawiki/php-1.38.0-wmf.16/extensions/SpamBlacklist/includes/SpamBlacklistHooks.php(45): MediaWiki\Storage\DerivedPageDataUpdater->getParserOutputForMetaData()
#3 /srv/mediawiki/php-1.38.0-wmf.16/includes/HookContainer/HookContainer.php(160): SpamBlacklistHooks->onEditFilterMergedContent(RequestContext, WikitextContent, Status, string, User, boolean)
#4 /srv/mediawiki/php-1.38.0-wmf.16/includes/HookContainer/HookRunner.php(1467): MediaWiki\HookContainer\HookContainer->run(string, array)
#5 /srv/mediawiki/php-1.38.0-wmf.16/includes/actions/McrUndoAction.php(381): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent(RequestContext, WikitextContent, Status, string, User, boolean)
#6 /srv/mediawiki/php-1.38.0-wmf.16/includes/htmlform/HTMLForm.php(724): McrUndoAction->onSubmit(array, OOUIHTMLForm)
#7 /srv/mediawiki/php-1.38.0-wmf.16/includes/htmlform/HTMLForm.php(614): HTMLForm->trySubmit()
#8 /srv/mediawiki/php-1.38.0-wmf.16/includes/htmlform/HTMLForm.php(630): HTMLForm->tryAuthorizedSubmit()
#9 /srv/mediawiki/php-1.38.0-wmf.16/includes/actions/FormAction.php(160): HTMLForm->show()
#10 /srv/mediawiki/php-1.38.0-wmf.16/includes/actions/McrUndoAction.php(127): FormAction->show()
#11 /srv/mediawiki/php-1.38.0-wmf.16/includes/MediaWiki.php(543): McrUndoAction->show()
#12 /srv/mediawiki/php-1.38.0-wmf.16/includes/MediaWiki.php(320): MediaWiki->performAction(ImagePage, Title)
#13 /srv/mediawiki/php-1.38.0-wmf.16/includes/MediaWiki.php(903): MediaWiki->performRequest()
#14 /srv/mediawiki/php-1.38.0-wmf.16/includes/MediaWiki.php(563): MediaWiki->main()
#15 /srv/mediawiki/php-1.38.0-wmf.16/index.php(53): MediaWiki->run()
#16 /srv/mediawiki/php-1.38.0-wmf.16/index.php(46): wfIndexMain()
#17 /srv/mediawiki/w/index.php(3): require(string)
#18 {main}

Very likely but there is a catch there :/ I check.

Change 753618 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/SpamBlacklist@master] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753618

Change 753504 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/SpamBlacklist@wmf/1.38.0-wmf.17] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753504

Change 753505 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/SpamBlacklist@wmf/1.38.0-wmf.16] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753505

Change 753618 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@master] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753618

Change 753504 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@wmf/1.38.0-wmf.17] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753504

Change 753505 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@wmf/1.38.0-wmf.16] Take LogicException into consideration

https://gerrit.wikimedia.org/r/753505

Mentioned in SAL (#wikimedia-operations) [2022-01-13T08:21:36Z] <ladsgroup@deploy1002> Synchronized php-1.38.0-wmf.17/extensions/SpamBlacklist/includes/SpamBlacklistHooks.php: Backport: [[gerrit:753504|Take LogicException into consideration (T299111)]] (duration: 01m 28s)

Mentioned in SAL (#wikimedia-operations) [2022-01-13T08:28:37Z] <ladsgroup@deploy1002> Synchronized php-1.38.0-wmf.16/extensions/SpamBlacklist/includes/SpamBlacklistHooks.php: Backport: [[gerrit:753505|Take LogicException into consideration (T299111)]] (duration: 01m 28s)