Last modified: 2013-05-06 15:46:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49193, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47193 - Diff links between revdeleted versions in deleted histories cause PHP error: DifferenceEngine::generateContentDiffBody() must implement interface Content, null given
Diff links between revdeleted versions in deleted histories cause PHP error: ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-13 12:25 UTC by orlodrim
Modified: 2013-05-06 15:46 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description orlodrim 2013-04-13 12:25:28 UTC
Some diff links in deleted histories between DELETED_TEXT+DELETED_RESTRICTED revisions and DELETED_TEXT revisions raise an error in SpecialUndelete.php for sysops.

I first noticed this bug in the deleted history of [[fr:FC Lyon 13]], that contains the link http://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Restaurer&target=FC+Lyon+13&timestamp=20120112092914&diff=prev. It causes a PHP error when logged in with a sysop (but not oversight) account: "PHP fatal error in /usr/local/apache/common-local/php-1.22wmf1/includes/diff/DifferenceEngine.php line 752:
Argument 1 passed to DifferenceEngine::generateContentDiffBody() must implement interface Content, null given, called in /usr/local/apache/common-local/php-1.22wmf1/includes/specials/SpecialUndelete.php on line 1015 and defined"

Steps to reproduce (it requires an account with sysop and oversight rights, and a second account with sysop but no oversight rights):
1. Create a page and edit it twice, so that there are three versions (say that #1 the oldest version, then come #2 and #3 the current version).
2. With the sysop+oversight account, set the visibility parameters of revision #1 to DELETED_TEXT + DELETED_RESTRICTED ("Hide revision text" and "Suppress data from administrators as well as others") and set the visibility parameters of revision #2 to DELETED_TEXT ("Hide revision text")
3. With the sysop-only account, delete the page and go the deleted history. For revision #2, a diff link is visible (this is already a minor bug, as a sysop cannot see the diff between #1 and #2).
4. Clicking on this diff link causes the error described at the beginning.
Comment 1 Sam Reed (reedy) 2013-04-13 15:42:07 UTC
[13-Apr-2013 13:46:51] Catchable fatal error: Argument 1 passed to DifferenceEngine::generateContentDiffBody() must implement interface Content, null given, called in /usr/local/apache/common-local/php-1.22wmf1/includes/specials/SpecialUndelete.php on line 1015 and defined at /usr/local/apache/common-local/php-1.22wmf1/includes/diff/DifferenceEngine.php on line 752
Server: mw1027
Method: GET
Backtrace:
#0 /usr/local/apache/common-local/php-1.22wmf1/includes/diff/DifferenceEngine.php(752): DifferenceEngine::generateContentDiffBody()
#1 /usr/local/apache/common-local/php-1.22wmf1/includes/specials/SpecialUndelete.php(1015): DifferenceEngine->generateContentDiffBody(NULL, Object(WikitextContent))
#2 /usr/local/apache/common-local/php-1.22wmf1/includes/specials/SpecialUndelete.php(874): SpecialUndelete->showDiff(Object(Revision), Object(Revision))
#3 /usr/local/apache/common-local/php-1.22wmf1/includes/specials/SpecialUndelete.php(749): SpecialUndelete->showRevision('20120112092914')
#4 /usr/local/apache/common-local/php-1.22wmf1/includes/SpecialPage.php(613): SpecialUndelete->execute(NULL)
#5 /usr/local/apache/common-local/php-1.22wmf1/includes/SpecialPageFactory.php(486): SpecialPage->run(NULL)
#6 /usr/local/apache/common-local/php-1.22wmf1/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#7 /usr/local/apache/common-local/php-1.22wmf1/includes/Wiki.php(565): MediaWiki->performRequest()
#8 /usr/local/apache/common-local/php-1.22wmf1/includes/Wiki.php(458): MediaWiki->main()
#9 /usr/local/apache/common-local/php-1.22wmf1/index.php(59): MediaWiki->run()
#10 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#11 {main}
Comment 2 Andre Klapper 2013-05-06 15:46:01 UTC
Setting priority to normal, because this is "only" about revdeleted which is not too accessible.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links