Page MenuHomePhabricator

Diffing revisions before & after wikidata/mediainfo things got added fail
Closed, ResolvedPublic

Description

Reproduce: upload image & add MediaInfo entities.
Go to history, select first revision (from when there was no MediaInfo data yet)
Click "edit" - should take you to "restore" and show a diff.
Instead, you'll get this error:

[f36b83af22c5a24fe0efc0db] /w/index.php?title=File:a-new-file.jpg&action=mcrrestore&restore=575 RuntimeException from line 147 of /vagrant/mediawiki/extensions/Wikibase/repo/includes/Content/EntityContent.php: EntityContent was constructed without an EntityId!

Backtrace:

#0 /vagrant/mediawiki/extensions/Wikibase/repo/includes/Content/EntityContent.php(457): Wikibase\EntityContent->getEntityId()
#1 /vagrant/mediawiki/extensions/Wikibase/repo/includes/Content/EntityContent.php(572): Wikibase\EntityContent->getRedirectData()
#2 /vagrant/mediawiki/extensions/Wikibase/repo/includes/Diff/EntityContentDiffView.php(135): Wikibase\EntityContent->getDiff(Wikibase\MediaInfo\Content\MediaInfoContent)
#3 /vagrant/mediawiki/includes/diff/DifferenceEngineSlotDiffRenderer.php(58): Wikibase\Repo\Diff\EntityContentDiffView->generateContentDiffBody(Wikibase\MediaInfo\Content\MediaInfoContent, Wikibase\MediaInfo\Content\MediaInfoContent)
#4 /vagrant/mediawiki/includes/diff/DifferenceEngine.php(1056): DifferenceEngineSlotDiffRenderer->getDiff(Wikibase\MediaInfo\Content\MediaInfoContent, Wikibase\MediaInfo\Content\MediaInfoContent)
#5 /vagrant/mediawiki/includes/diff/DifferenceEngine.php(974): DifferenceEngine->getDiffBody()
#6 /vagrant/mediawiki/includes/actions/McrUndoAction.php(242): DifferenceEngine->getDiff(string, string)
#7 /vagrant/mediawiki/includes/actions/McrUndoAction.php(363): McrUndoAction->generateDiffOrPreview()
#8 /vagrant/mediawiki/includes/htmlform/fields/HTMLInfoField.php(25): McrUndoAction->{closure}(array)
#9 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(1670): HTMLInfoField->getDefault()
#10 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(1254): HTMLForm->displaySection(array, string)
#11 /vagrant/mediawiki/includes/htmlform/OOUIHTMLForm.php(252): HTMLForm->getBody()
#12 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(1044): OOUIHTMLForm->getBody()
#13 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(1023): HTMLForm->getHTML(boolean)
#14 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(577): HTMLForm->displayForm(boolean)
#15 /vagrant/mediawiki/includes/actions/FormAction.php(143): HTMLForm->show()
#16 /vagrant/mediawiki/includes/actions/McrUndoAction.php(90): FormAction->show()
#17 /vagrant/mediawiki/includes/MediaWiki.php(506): McrUndoAction->show()
#18 /vagrant/mediawiki/includes/MediaWiki.php(294): MediaWiki->performAction(ImagePage, Title)
#19 /vagrant/mediawiki/includes/MediaWiki.php(873): MediaWiki->performRequest()
#20 /vagrant/mediawiki/includes/MediaWiki.php(530): MediaWiki->main()
#21 /vagrant/mediawiki/index.php(42): MediaWiki->run()
#22 /var/www/w/index.php(5): require(string)
#23 {main}

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterHandle diffs for EntityContents without handler

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptOct 10 2018, 2:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 465435 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/Wikibase@master] Handle diffs for EntityContents without handler

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

Change 465435 had a related patch set uploaded (by Jforrester; owner: Matthias Mullie):
[mediawiki/extensions/Wikibase@master] Handle diffs for EntityContents without handler

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

Change 465435 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Handle diffs for EntityContents without handler

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

Ramsey-WMF triaged this task as High priority.Oct 17 2018, 5:08 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.
Ramsey-WMF closed this task as Resolved.Nov 8 2018, 7:04 PM
Ramsey-WMF added a subscriber: Ramsey-WMF.

Tested multiple times and confirmed as fixed.

greg added a project: Multimedia.Mar 7 2019, 10:59 PM