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

[datatables] Call to a member function getFullText() on null #851

Open
jaideraf opened this issue Oct 9, 2024 · 6 comments
Open

[datatables] Call to a member function getFullText() on null #851

jaideraf opened this issue Oct 9, 2024 · 6 comments
Assignees
Labels

Comments

@jaideraf
Copy link
Member

jaideraf commented Oct 9, 2024

Setup

  • MW version: 1.39.8
  • DB (MariaDB etc.): 10.3.39
  • PHP version: 7.4.3
  • SMW version: 5.0.0-alpha
  • SRF version: 4.2.1

Issue

When changing from broadtable format to datatables format in the following ask query I get the error:

Steps to reproduce

{{#ask: [[Category:Obra]] [[Creation date::+]]
 |?Creation date#-F[d/m/Y]=Data de criação
 |?Page creator#
 |format=datatables
 |limit=100
 |offset=0
 |link=all
 |sort=Creation date
 |order=desc
 |intro=Últimos registros bibliográficos
 |headers=plain
 |searchlabel=… mais resultados
 |class=datatable compact cell-border
 |prefix=none
}} 

Stacktrace

[7cb75efc50dce10cc06db230] /w/index.php?title=Usu%C3%A1rio:Jaider.ferreira/teste&action=submit Error: Call to a member function getFullText() on null

Backtrace:

from /w/extensions/SemanticMediaWiki/src/Serializers/QueryResultSerializer.php(125)
#0 /w/extensions/SemanticMediaWiki/src/Serializers/QueryResultSerializer.php(216): SMW\Serializers\QueryResultSerializer::getSerialization()
#1 /w/extensions/SemanticMediaWiki/src/Serializers/QueryResultSerializer.php(58): SMW\Serializers\QueryResultSerializer::getSerializedQueryResult()
#2 /w/extensions/SemanticMediaWiki/src/Query/QueryResult.php(453): SMW\Serializers\QueryResultSerializer->serialize()
#3 /w/extensions/SemanticMediaWiki/src/Query/QueryResult.php(479): SMW\Query\QueryResult->serializeToArray()
#4 /w/extensions/SemanticResultFormats/formats/datatables/DataTables.php(554): SMW\Query\QueryResult->toArray()
#5 /w/extensions/SemanticResultFormats/formats/datatables/DataTables.php(440): SRF\DataTables->getResultText()
#6 /w/extensions/SemanticMediaWiki/src/Query/ResultPrinters/ResultPrinter.php(302): SRF\DataTables->buildResult()
#7 /w/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(344): SMW\Query\ResultPrinters\ResultPrinter->getResult()
#8 /w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(364): SMWQueryProcessor::getResultFromQuery()
#9 /w/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(201): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters()
#10 /w/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(392): SMW\ParserFunctions\AskParserFunction->parse()
#11 /w/includes/parser/Parser.php(3439): SMW\ParserFunctionFactory->SMW\{closure}()
#12 /w/includes/parser/Parser.php(3124): Parser->callParserFunction()
#13 /w/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution()
#14 /w/includes/parser/Parser.php(2953): PPFrame_Hash->expand()
#15 /w/includes/parser/Parser.php(1609): Parser->replaceVariables()
#16 /w/includes/parser/Parser.php(723): Parser->internalParse()
#17 /w/includes/content/WikitextContentHandler.php(301): Parser->parse()
#18 /w/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#19 /w/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#20 /w/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#21 /w/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#22 /w/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#23 /w/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#24 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#25 /w/includes/Revision/RenderedRevision.php(199): call_user_func()
#26 /w/includes/Storage/DerivedPageDataUpdater.php(1430): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#27 /w/extensions/SpamBlacklist/includes/Hooks.php(74): MediaWiki\Storage\DerivedPageDataUpdater->getParserOutputForMetaData()
#28 /w/includes/HookContainer/HookContainer.php(160): MediaWiki\Extension\SpamBlacklist\Hooks->onEditFilterMergedContent()
#29 /w/includes/HookContainer/HookRunner.php(1475): MediaWiki\HookContainer\HookContainer->run()
#30 /w/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php(106): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent()
#31 /w/includes/editpage/Constraint/EditConstraintRunner.php(88): MediaWiki\EditPage\Constraint\EditFilterMergedContentHookConstraint->checkConstraint()
#32 /w/includes/EditPage.php(2345): MediaWiki\EditPage\Constraint\EditConstraintRunner->checkConstraints()
#33 /w/includes/EditPage.php(1905): EditPage->internalAttemptSave()
#34 /w/includes/EditPage.php(722): EditPage->attemptSave()
#35 /w/includes/actions/EditAction.php(73): EditPage->edit()
#36 /w/includes/actions/SubmitAction.php(38): EditAction->show()
#37 /w/includes/MediaWiki.php(542): SubmitAction->show()
#38 /w/includes/MediaWiki.php(322): MediaWiki->performAction()
#39 /w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#40 /w/includes/MediaWiki.php(562): MediaWiki->main()
#41 /w/index.php(50): MediaWiki->run()
#42 /w/index.php(46): wfIndexMain()
#43 {main}
@thomas-topway-it
Copy link
Contributor

@jaideraf noted, thank you, is this related to #854 ?

@jaideraf
Copy link
Member Author

No, not related, I guess.

@jaideraf
Copy link
Member Author

Oddly, the problem is not happening now. I don't now what has changed in the meantime. So I am closing the issue. If it will happen again I will reopen it. Thank you.

@jaideraf
Copy link
Member Author

Ops, IT IS still happening, I forgot to change the format to datatables, sorry for the confusion. But it happens even without the intro param, so it is not related to #854

{{#ask: [[Category:Obra]] [[Creation date::+]]
 |?Creation date#-F[d/m/Y]=Data de criação
 |?Page creator#
 |format=datatables
 |limit=100
 |offset=0
 |link=all
 |sort=Creation date
 |order=desc
 |headers=plain
 |searchlabel=… mais resultados
 |class=datatable compact cell-border
 |prefix=none
}}

@jaideraf jaideraf reopened this Oct 18, 2024
@thomas-topway-it
Copy link
Contributor

ok, is there an url to check for this live ?

@jaideraf
Copy link
Member Author

jaideraf commented Oct 18, 2024

is there an url to check for this live ?

Sort of... the problem does not permit to save de page, so you will have to register an account with an e-mail, confirm the email, and then edit the following page, changing from broadtable to datatables:

https://wikincat.org/w/index.php?title=Usu%C3%A1rio:Jaider.ferreira/Testes&action=edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants