Last modified: 2013-05-06 15:46:01 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×tamp=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.
[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}
Setting priority to normal, because this is "only" about revdeleted which is not too accessible.