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

1.36 DPL3 used in a Template:Subpages. When template accessed from a page and no subpages exist, error occurs. #42

Closed
hpyjoy opened this issue Jun 8, 2021 · 0 comments · Fixed by #57
Assignees
Labels
bug Something isn't working

Comments

@hpyjoy
Copy link

hpyjoy commented Jun 8, 2021

1.36 DPL3 used in a Template:Subpages. When template accessed from a page and no subpages exist, error occurs.

Detailed Reproduction Steps:

On MediaWiki 1.36

Template:Subpages

{{#dpl:
titlematch={{{1|{{PAGENAME}}}}}/%
|nottitlematch={{{1|{{PAGENAME}}}}}/%/%{{!}}%Consolidated
|notuses=Template:Draft
|ordermethod=title
|replaceintitle=/./([^/])/,$1
|shownamespace=false
|noresultsheader=''No subpages''
|allowcachedresults=false
}}

Create MediaWiki page with this text:

{{Subpages}}

Error:
[5b103f324a2a2dea9c7a618e] /wiki/index.php?title=ARG&action=submit Error: mysqli_result object is already closed
Backtrace:
from C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DatabaseMysqli.php(176)
#0 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DatabaseMysqli.php(176): mysqli_result->free_result()
#1 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DatabaseMysqlBase.php(232): Wikimedia\Rdbms\DatabaseMysqli->mysqlFreeResult(mysqli_result)
#2 (closed) C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(68): Wikimedia\Rdbms\DatabaseMysqlBase->freeResult(Wikimedia\Rdbms\ResultWrapper)
#3 (closed) C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(290): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#4 (closed) C:\xampp\htdocs\wiki\extensions\DynamicPageList3\includes\Parse.php(246): Wikimedia\Rdbms\DBConnRef->freeResult(Wikimedia\Rdbms\ResultWrapper)
#5 (closed) C:\xampp\htdocs\wiki\extensions\DynamicPageList3\DynamicPageListHooks.php(300): DPL\Parse->parse(string, Parser, NULL, NULL, boolean)
#6 (closed) C:\xampp\htdocs\wiki\includes\parser\Parser.php(3356): DynamicPageListHooks::dplParserFunction(Parser, string, string, string, string, string, string, string, string)
#7 C:\xampp\htdocs\wiki\includes\parser\Parser.php(3041): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#8 (closed) C:\xampp\htdocs\wiki\includes\parser\PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#9 (closed) C:\xampp\htdocs\wiki\includes\parser\PPTemplateFrame_Hash.php(97): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#10 (closed) C:\xampp\htdocs\wiki\includes\parser\Parser.php(3227): PPTemplateFrame_Hash->cachedExpand(string, PPNode_Hash_Tree)
#11 (closed) C:\xampp\htdocs\wiki\includes\parser\PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
#12 C:\xampp\htdocs\wiki\includes\parser\Parser.php(2879): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#13 C:\xampp\htdocs\wiki\includes\parser\Parser.php(1549): Parser->replaceVariables(string)
#14 (closed) C:\xampp\htdocs\wiki\includes\parser\Parser.php(639): Parser->internalParse(string)
#15 (closed) C:\xampp\htdocs\wiki\includes\content\WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#16 C:\xampp\htdocs\wiki\includes\content\AbstractContent.php(591): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#17 C:\xampp\htdocs\wiki\includes\Revision\RenderedRevision.php(263): AbstractContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#18 (closed) C:\xampp\htdocs\wiki\includes\Revision\RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#19 (closed) C:\xampp\htdocs\wiki\includes\Revision\RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#20 C:\xampp\htdocs\wiki\includes\Revision\RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#21 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision{closure}(MediaWiki\Revision\RenderedRevision, array)
#22 (closed) C:\xampp\htdocs\wiki\includes\Revision\RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#23 (closed) C:\xampp\htdocs\wiki\includes\Storage\DerivedPageDataUpdater.php(1347): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#24 (closed) [internal function]: MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#25 C:\xampp\htdocs\wiki\includes\edit\PreparedEdit.php(104): call_user_func(array)
#26 C:\xampp\htdocs\wiki\includes\edit\PreparedEdit.php(119): MediaWiki\Edit\PreparedEdit->getOutput()
#27 C:\xampp\htdocs\wiki\includes\Storage\DerivedPageDataUpdater.php(1325): MediaWiki\Edit\PreparedEdit->__get(string)
#28 C:\xampp\htdocs\wiki\includes\page\WikiPage.php(2326): MediaWiki\Storage\DerivedPageDataUpdater->getPreparedEdit()
#29 C:\xampp\htdocs\wiki\extensions\SpamBlacklist\includes\SpamBlacklistHooks.php(34): WikiPage->prepareContentForEdit(WikitextContent)
#30 C:\xampp\htdocs\wiki\includes\HookContainer\HookContainer.php(338): SpamBlacklistHooks::filterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#31 C:\xampp\htdocs\wiki\includes\HookContainer\HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#32 C:\xampp\htdocs\wiki\includes\HookContainer\HookRunner.php(1559): MediaWiki\HookContainer\HookContainer->run(string, array)
#33 C:\xampp\htdocs\wiki\includes\editpage\Constraint\EditFilterMergedContentHookConstraint.php(90): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#34 C:\xampp\htdocs\wiki\includes\editpage\Constraint\EditConstraintRunner.php(88): MediaWiki\EditPage\Constraint\EditFilterMergedContentHookConstraint->checkConstraint()
#35 (closed) C:\xampp\htdocs\wiki\includes\EditPage.php(2275): MediaWiki\EditPage\Constraint\EditConstraintRunner->checkConstraints()
#36 (closed) C:\xampp\htdocs\wiki\includes\EditPage.php(1694): EditPage->internalAttemptSave(NULL, boolean)
#37 (closed) C:\xampp\htdocs\wiki\includes\EditPage.php(669): EditPage->attemptSave(NULL)
#38 (closed) C:\xampp\htdocs\wiki\includes\actions\EditAction.php(71): EditPage->edit()
#39 (closed) C:\xampp\htdocs\wiki\includes\actions\SubmitAction.php(38): EditAction->show()
#40 (closed) C:\xampp\htdocs\wiki\includes\MediaWiki.php(531): SubmitAction->show()
#41 (closed) C:\xampp\htdocs\wiki\includes\MediaWiki.php(315): MediaWiki->performAction(Article, Title)
#42 C:\xampp\htdocs\wiki\includes\MediaWiki.php(913): MediaWiki->performRequest()
#43 C:\xampp\htdocs\wiki\includes\MediaWiki.php(546): MediaWiki->main()
#44 (closed) C:\xampp\htdocs\wiki\index.php(53): MediaWiki->run()
#45 (closed) C:\xampp\htdocs\wiki\index.php(46): wfIndexMain()
#46 (closed) {main}

@Universal-Omega Universal-Omega added the bug Something isn't working label Sep 16, 2021
@Universal-Omega Universal-Omega linked a pull request Sep 29, 2021 that will close this issue
@Universal-Omega Universal-Omega self-assigned this Sep 29, 2021
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.

2 participants