Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in SMW 4.x #23

Closed
krabina opened this issue Apr 11, 2022 · 1 comment · Fixed by #24
Closed

Error in SMW 4.x #23

krabina opened this issue Apr 11, 2022 · 1 comment · Fixed by #24
Labels
bug Something isn't working

Comments

@krabina
Copy link

krabina commented Apr 11, 2022

Setup

  • MW version: 1.35.5
  • DB (MySQL etc.): 10.3.34-MariaDB
  • PHP version: 7.4.28
  • SMW version: 4.0.1 (fd1b241)
  • SRF version: 4.0.1 (44c0bd8)
  • Browsers and versions (if applicable):

Issue

Same query working in SMW 3.x is breaks with SMW 4.x
https://www.ogdcockpit.eu/OGD_Cockpit

Stacktrace

[YlQjca-4FYzcjIo8Y-GyswABBw4] /index.php?title=OGD-Cockpit&action=submit TypeError from line 56 of /extensions/ModernTimeline/src/JsonBuilder.php: Argument 1 passed to ModernTimeline\JsonBuilder::newHeadline() must be an instance of Title, null given, called in /extensions/ModernTimeline/src/JsonBuilder.php on line 36

Backtrace:

#0 /extensions/ModernTimeline/src/JsonBuilder.php(36): ModernTimeline\JsonBuilder->newHeadline(NULL)
#1 /extensions/ModernTimeline/src/JsonBuilder.php(27): ModernTimeline\JsonBuilder->buildEvent(ModernTimeline\Event)
#2 /extensions/ModernTimeline/src/TimelinePresenter.php(40): ModernTimeline\JsonBuilder->eventsToTimelineJson(array)
#3 /extensions/ModernTimeline/src/TimelinePresenter.php(32): ModernTimeline\TimelinePresenter->createJsonString(ModernTimeline\ResultFacade\SimpleQueryResult)
#4 /extensions/ModernTimeline/src/ModernTimelinePrinter.php(61): ModernTimeline\TimelinePresenter->presentResult(ModernTimeline\ResultFacade\SimpleQueryResult)
#5 /extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(348): ModernTimeline\ModernTimelinePrinter->getResult(SMW\Query\QueryResult, array, integer)
#6 /extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(364): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#7 /extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(196): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(array, array)
#8 /extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(402): SMW\ParserFunctions\AskParserFunction->parse(array)
#9 /includes/parser/Parser.php(3340): SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string, string, string, string, string, string, string, string)
#10 /includes/parser/Parser.php(3047): Parser->callParserFunction(PPFrame_Hash, string, array)
#11 /includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
#12 /includes/parser/Parser.php(2887): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#13 /includes/parser/Parser.php(1556): Parser->replaceVariables(string)
#14 /includes/parser/Parser.php(651): Parser->internalParse(string)
#15 /includes/content/WikitextContent.php(374): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#16 /includes/content/AbstractContent.php(590): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#17 /includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#18 /includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#19 /includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#20 /includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#21 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#22 /includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#23 /includes/Storage/DerivedPageDataUpdater.php(1315): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#24 /includes/Storage/PageUpdater.php(752): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#25 /includes/page/WikiPage.php(2015): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#26 /includes/EditPage.php(2459): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#27 /includes/EditPage.php(1726): EditPage->internalAttemptSave(array, boolean)
#28 /includes/EditPage.php(680): EditPage->attemptSave(array)
#29 /includes/actions/EditAction.php(71): EditPage->edit()
#30 /includes/actions/SubmitAction.php(38): EditAction->show()
#31 /includes/MediaWiki.php(532): SubmitAction->show()
#32 /includes/MediaWiki.php(313): MediaWiki->performAction(Article, Title)
#33 /includes/MediaWiki.php(945): MediaWiki->performRequest()
#34 /includes/MediaWiki.php(548): MediaWiki->main()
#35 /index.php(53): MediaWiki->run()
#36 /index.php(46): wfIndexMain()
#37 {main}


@JeroenDeDauw
Copy link
Member

This is likely due to SMW return values for a page that no longer exists. Still, the timeline should not break if that happens.

JeroenDeDauw added a commit that referenced this issue Apr 11, 2022
@kghbln kghbln added the bug Something isn't working label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants