Page MenuHomePhabricator

Error from line 52 of "PageTranslationHooks.php": Call to a member function getIsSectionPreview() on null
Open, Needs TriagePublic

Description

Setup

  • MediaWiki 1.33.0 (62dc614) 08:13, 24. Jul. 2019
  • PHP 7.2.19-0ubuntu0.18.04.1 (apache2handler)
  • MariaDB 10.1.40-MariaDB-0ubuntu0.18.04.1
  • Maps 7.3.3 (2b48ba2) 21:01, 2. Aug. 2019
  • Semantic MediaWiki 3.1.0-alpha (431b5aa) 21:14, 4. Aug. 2019
  • Translate 2019-07-22 MLEB 2019.07 (c4d04b7) 08:41, 24. Jul. 2019

Issue

[597fb0fb8f1fdcbc9b732311] /w/index.php?title=Sp%C3%A9cial:Requ%C3%AAter&x=-5B-5BHas-20coordinates%3A%3A%2B-5D-5D%2F-3FHas-20coordinates&format=leaflet&template=boom Error from line 52 of /../w/extensions/Translate/tag/PageTranslationHooks.php: Call to a member function getIsSectionPreview() on null

Backtrace

#0 /../w/includes/Hooks.php(174): PageTranslationHooks::renderTagPage(Parser, string, NULL)
#1 /../w/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#2 /../w/includes/parser/Parser.php(695): Hooks::run(string, array)
#3 /../w/includes/parser/Parser.php(721): Parser->recursiveTagParse(string, boolean)
#4 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/QueryHandler.php(456): Parser->recursiveTagParseFully(string)
#5 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/QueryHandler.php(178): Maps\SemanticMW\ResultPrinters\QueryHandler->buildLocationsList(array, string, string, array, Title)
#6 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/QueryHandler.php(155): Maps\SemanticMW\ResultPrinters\QueryHandler->handlePageResult(array)
#7 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php(280): Maps\SemanticMW\ResultPrinters\QueryHandler->getLocations()
#8 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php(220): Maps\SemanticMW\ResultPrinters\MapPrinter->getJsonForLocations(Generator, array, string, string)
#9 /../w/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php(135): Maps\SemanticMW\ResultPrinters\MapPrinter->handleMarkerData(array, Maps\SemanticMW\ResultPrinters\QueryHandler)
#10 /../w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(341): Maps\SemanticMW\ResultPrinters\MapPrinter->getResultText(SMW\Query\QueryResult, integer)
#11 /../w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(306): SMW\Query\ResultPrinters\ResultPrinter->buildResult(SMW\Query\QueryResult)
#12 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Specials/SpecialAsk.php(481): SMW\Query\ResultPrinters\ResultPrinter->getResult(SMW\Query\QueryResult, array, integer)
#13 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Specials/SpecialAsk.php(316): SMW\MediaWiki\Specials\SpecialAsk->fetchResults(Maps\SemanticMW\ResultPrinters\MapPrinter, SMWQuery, SMW\MediaWiki\Specials\Ask\UrlArgs)
#14 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Specials/SpecialAsk.php(169): SMW\MediaWiki\Specials\SpecialAsk->makeHTMLResult()
#15 /../w/includes/specialpage/SpecialPage.php(569): SMW\MediaWiki\Specials\SpecialAsk->execute(NULL)
#16 /../w/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)
#17 /../w/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#18 /../w/includes/MediaWiki.php(865): MediaWiki->performRequest()
#19 /../w/includes/MediaWiki.php(515): MediaWiki->main()
#20 /../w/index.php(42): MediaWiki->run()
#21 {main}

Note
Apparently a whole bunch of extensions is at play here. In case Translate is not the cause please inform accordingly. Thanks.

Event Timeline

Kghbln created this task.Aug 5 2019, 8:49 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 5 2019, 8:49 PM

The return documentation of Parser::getOptions() is violated. That's not Translate's fault I believe.

Does that mean that this issue should be changed to be a core bug?

Not sure, would require some more investigation to figure out what is setting mOptions to null (or not initializing it).