Page MenuHomePhabricator

PHP Notice: Undefined property: Wikimedia\Parsoid\NodeData\DataParsoid::$tsr
Closed, ResolvedPublicBUG REPORT

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined property: Wikimedia\Parsoid\NodeData\DataParsoid::$tsr
exception.trace
from /srv/parsoid-testing/src/Wt2Html/PP/Processors/AnnotationDOMRangeBuilder.php(148)
#0 /srv/parsoid-testing/src/Wt2Html/PP/Processors/AnnotationDOMRangeBuilder.php(148): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/parsoid-testing/src/Wt2Html/PP/Processors/AnnotationDOMRangeBuilder.php(64): Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::setMetaDataMwForRange(Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeInfo)
#2 /srv/parsoid-testing/src/Wt2Html/PP/Processors/AnnotationDOMRangeBuilder.php(185): Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder->wrapAnnotationsInTree(Wikimedia\Parsoid\DOM\Compat\Element)
#3 /srv/parsoid-testing/src/Wt2Html/PP/Processors/WrapAnnotations.php(22): Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder->execute(Wikimedia\Parsoid\DOM\Compat\Element)
#4 /srv/parsoid-testing/src/Wt2Html/DOMPostProcessor.php(160): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapAnnotations->run(Wikimedia\Parsoid\Config\Env, Wikimedia\Parsoid\DOM\Compat\Element, array, boolean)
#5 /srv/parsoid-testing/src/Wt2Html/DOMPostProcessor.php(979): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(Wikimedia\Parsoid\DOM\Compat\Element, array, boolean)
#6 /srv/parsoid-testing/src/Wt2Html/DOMPostProcessor.php(1033): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(Wikimedia\Parsoid\DOM\Compat\Element)
#7 /srv/parsoid-testing/src/Wt2Html/DOMPostProcessor.php(1051): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(Wikimedia\Parsoid\DOM\Compat\Element)
#8 /srv/parsoid-testing/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#9 /srv/parsoid-testing/src/Wt2Html/ParserPipelineFactory.php(308): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#10 /srv/parsoid-testing/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#11 /srv/parsoid-testing/src/Parsoid.php(166): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#12 /srv/parsoid-testing/src/Parsoid.php(198): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#13 /srv/parsoid-testing/extension/src/Rest/Handler/ParsoidHandler.php(589): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#14 /srv/parsoid-testing/extension/src/Rest/Handler/TransformHandler.php(119): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array, string)
#15 /srv/mediawiki/php-1.38.0-wmf.7/includes/Rest/Router.php(403): MWParsoid\Rest\Handler\TransformHandler->execute()
#16 /srv/mediawiki/php-1.38.0-wmf.7/includes/Rest/Router.php(330): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#17 /srv/mediawiki/php-1.38.0-wmf.7/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#18 /srv/mediawiki/php-1.38.0-wmf.7/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#19 /srv/mediawiki/php-1.38.0-wmf.7/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#20 /srv/mediawiki/w/rest.php(3): require(string)
#21 {main}
Impact
Notes

Details

Request URL
http//meta.wikimedia.org/w/rest.php/meta.wikimedia.org/v3/transform/wikitext/to/pagebundle/Community_Wishlist_Survey_2016
Related Changes in Gerrit:

Event Timeline

ssastry triaged this task as Medium priority.
ssastry changed the subtype of this task from "Production Error" to "Bug Report".Nov 7 2021, 3:51 AM

First investigation points in the direction of something weird happening in findWrappabbleMetaRanges (may only be unexpected by me, not unexpected in general...): some ranges (identified by ID) are repeated in the result of that method, and when they are, the TSR is not filled in in data-parsoid. To be continued, but I'll have a look at the other bugs first before I dig deeper into this specific rabbit hole.

Change 737441 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/services/parsoid@master] Fix global state of annotation id and DOMPostProcessor pass order

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

Change 737441 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Fix global state of annotation id and DOMPostProcessor pass order

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

Change 742570 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/vendor@master] Bump Parsoid to 0.15.0-a11

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

Change 742570 merged by jenkins-bot:

[mediawiki/vendor@master] Bump Parsoid to 0.15.0-a11

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