Page MenuHomePhabricator

Diff between .js- and .css-revisions broken
Closed, ResolvedPublic

Description

This is not verified in test or dev, only at a local repo.

Create [[Mediawiki:Vector.js]] and [[Mediawiki:Vector.css]] and make additional revisjons. Then take a diff between the two revisions. The following was then spit out from a localhost. It seems to be identical for both pages. The following is from the css page.

Notice: Undefined property: DifferenceEngine::$mContentObject in /home/john/Workspace/core/includes/diff/DifferenceEngine.php on line 525 Call Stack: 0.0004 648480

    1. {main}() /home/john/Workspace/core/index.php:0 0.0309 4170776
    2. MediaWiki->run() /home/john/Workspace/core/index.php:59 0.0310 4170776
    3. MediaWiki->main() /home/john/Workspace/core/includes/Wiki.php:446 0.0884 7562064
    4. MediaWiki->performRequest() /home/john/Workspace/core/includes/Wiki.php:536 0.0990 8477808
    5. MediaWiki->performAction() /home/john/Workspace/core/includes/Wiki.php:304 0.1040 8495416
    6. ViewAction->show() /home/john/Workspace/core/includes/Wiki.php:427 0.1040 8495416
    7. Article->view() /home/john/Workspace/core/includes/actions/ViewAction.php:37 0.1068 8509528
    8. Article->showDiffPage() /home/john/Workspace/core/includes/Article.php:553 0.1271 9460728
    9. DifferenceEngine->showDiffPage() /home/john/Workspace/core/includes/Article.php:823 0.5088 21291408
  1. DifferenceEngine->renderNewRevision() /home/john/Workspace/core/includes/diff/DifferenceEngine.php:415

Fatal error: Call to a member function getParserOutput() on a non-object in /home/john/Workspace/core/includes/diff/DifferenceEngine.php on line 525 Call Stack: 0.0004 648480

    1. {main}() /home/john/Workspace/core/index.php:0 0.0309 4170776
    2. MediaWiki->run() /home/john/Workspace/core/index.php:59 0.0310 4170776
    3. MediaWiki->main() /home/john/Workspace/core/includes/Wiki.php:446 0.0884 7562064
    4. MediaWiki->performRequest() /home/john/Workspace/core/includes/Wiki.php:536 0.0990 8477808
    5. MediaWiki->performAction() /home/john/Workspace/core/includes/Wiki.php:304 0.1040 8495416
    6. ViewAction->show() /home/john/Workspace/core/includes/Wiki.php:427 0.1040 8495416
    7. Article->view() /home/john/Workspace/core/includes/actions/ViewAction.php:37 0.1068 8509528
    8. Article->showDiffPage() /home/john/Workspace/core/includes/Article.php:553 0.1271 9460728
    9. DifferenceEngine->showDiffPage() /home/john/Workspace/core/includes/Article.php:823 0.5088 21291408
  1. DifferenceEngine->renderNewRevision() /home/john/Workspace/core/includes/diff/DifferenceEngine.php:415

Version: master
Severity: blocker

Details

Reference
bz40639

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:51 AM
bzimport set Reference to bz40639.
bzimport added a subscriber: Unknown Object (MLST).

Confirmed in Wikidata Test.

http://wikidata-test-repo.wikimedia.de/w/index.php?title=MediaWiki:Vector.js&curid=11919&diff=36813&oldid=36812

Fatal error: Call to a member function getParserOutput() on a non-object in /var/www/wikidata-test-repo.wikimedia.de/w/includes/diff/DifferenceEngine.php on line 525

Seems like something either kills the mContentObject in the hook
'ShowRawCssJs', or its not properly initialized, or it is simply wrong (its
never used anywhere else).

Line 525 is
$po = $this->mContentObject->getParserOutput();

Confirmed fix after a pull on core.

Verified in Wikidata demo time for sprint 18