Page MenuHomePhabricator

TemplateHandler.php: trim() expects parameter 1 to be string, boolean given
Closed, ResolvedPublic

Description

Exception trace for this request: /w/rest.php/uk.wikipedia.org/v3/page/pagebundle/%D0%9A%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87%3A%D0%9E%D0%BB%D0%B5%D0%B3-%D0%BB%D1%96%D1%82%D1%80%D0%B5%D0%B4%2F%D0%A7%D0%B5%D1%80%D0%BD%D0%B5%D1%82%D0%BA%D0%B0/25900962

#0 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TT/TemplateHandler.php(1255): trim(boolean)
#1 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TT/TemplateHandler.php(1323): Parsoid\Wt2Html\TT\TemplateHandler->processSpecialMagicWord(boolean, Parsoid\Tokens\SelfclosingTagTk, array)
#2 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TT/TemplateHandler.php(1451): Parsoid\Wt2Html\TT\TemplateHandler->onTemplate(Parsoid\Tokens\SelfclosingTagTk)
#3 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TT/TokenHandler.php(211): Parsoid\Wt2Html\TT\TemplateHandler->onTag(Parsoid\Tokens\SelfclosingTagTk)
#4 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TokenTransformManager.php(120): Parsoid\Wt2Html\TT\TokenHandler->process(array)
#5 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TokenTransformManager.php(192): Parsoid\Wt2Html\TokenTransformManager->processChunk(array)
#6 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/TokenTransformManager.php(190): Parsoid\Wt2Html\TokenTransformManager->processChunkily(string, array)
#7 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/HTML5TreeBuilder.php(431): Parsoid\Wt2Html\TokenTransformManager->processChunkily(string, array)
#8 [internal function]: Parsoid\Wt2Html\HTML5TreeBuilder->processChunkily(string, array)
#9 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/DOMPostProcessor.php(895): Generator->current()
#10 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/ParserPipeline.php(148): Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#11 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/ParserPipeline.php(198): Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#12 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Wt2Html/ParserPipelineFactory.php(308): Parsoid\Wt2Html\ParserPipeline->parseToplevelDoc(string, array)
#13 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/WikitextContentModelHandler.php(78): Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#14 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Parsoid.php(86): Parsoid\WikitextContentModelHandler->toHTML(Parsoid\Config\Env)
#15 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/src/Parsoid.php(113): Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#16 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/extension/src/Rest/Handler/ParsoidHandler.php(591): Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#17 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/extension/src/Rest/Handler/PageHandler.php(47): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(Parsoid\Config\Env, array)
#18 /srv/mediawiki/php-1.35.0-wmf.3/includes/Rest/Router.php(315): MWParsoid\Rest\Handler\PageHandler->execute()
#19 /srv/mediawiki/php-1.35.0-wmf.3/includes/Rest/Router.php(285): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#20 /srv/mediawiki/php-1.35.0-wmf.3/includes/Rest/EntryPoint.php(116): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#21 /srv/mediawiki/php-1.35.0-wmf.3/includes/Rest/EntryPoint.php(83): MediaWiki\Rest\EntryPoint->execute()
#22 /srv/mediawiki/php-1.35.0-wmf.3/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#23 /srv/mediawiki/w/rest.php(3): require(string)
#24 {main}

Details

Related Gerrit Patches:

Event Timeline

ssastry triaged this task as Medium priority.Oct 29 2019, 8:57 PM
ssastry created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2019, 8:57 PM
ssastry updated the task description. (Show Details)Oct 29 2019, 8:57 PM
ssastry moved this task from Backlog to Bugs, Notices, Crashers on the Parsoid-PHP board.
Sbailey claimed this task.Nov 5 2019, 6:00 PM

Change 548846 had a related patch set uploaded (by Sbailey; owner: Sbailey):
[mediawiki/services/parsoid@master] Fix for {{DEFAULTSORT}} used without parameter causing crash

https://gerrit.wikimedia.org/r/548846

Change 548846 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Fix for {{DEFAULTSORT}} used without parameter causing crash

https://gerrit.wikimedia.org/r/548846

Sbailey closed this task as Resolved.Nov 7 2019, 11:52 PM

Fix for crash completed and fixes that produce desired behavior and correct wikitext and VE edit updates all implemented and tests written.