Page MenuHomePhabricator

Invariant failed: Expected an element (from Parsoid DOMUtils)
Open, MediumPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\InvariantException: Invariant failed: Expected an element
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/assert/src/Assert.php(224)
#0 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Utils/DOMUtils.php(128): Wikimedia\Assert\Assert::invariant(boolean, string)
#1 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Ext/DOMUtils.php(64): Wikimedia\Parsoid\Utils\DOMUtils::assertElt(NULL)
#2 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Ext/Cite/Ref.php(73): Wikimedia\Parsoid\Ext\DOMUtils::assertElt(NULL)
#3 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1292): Wikimedia\Parsoid\Ext\Cite\Ref->lintHandler(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, DOMElement, Closure)
#4 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#5 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#6 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#7 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#8 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#9 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#10 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1305): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env, stdClass)
#11 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/Linter.php(1330): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->findLints(DOMElement, Wikimedia\Parsoid\Config\Env)
#12 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(158): Wikimedia\Parsoid\Wt2Html\PP\Processors\Linter->run(Wikimedia\Parsoid\Config\Env, DOMElement, array, boolean)
#13 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(853): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(DOMElement, array, boolean)
#14 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(903): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(DOMElement)
#15 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(920): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(DOMElement)
#16 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#17 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(310): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#18 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#19 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Parsoid.php(162): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#20 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/src/Parsoid.php(194): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#21 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(589): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#22 /srv/mediawiki/php-1.37.0-wmf.3/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(88): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array)
#23 /srv/mediawiki/php-1.37.0-wmf.3/includes/Rest/Router.php(395): MWParsoid\Rest\Handler\PageHandler->execute()
#24 /srv/mediawiki/php-1.37.0-wmf.3/includes/Rest/Router.php(322): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#25 /srv/mediawiki/php-1.37.0-wmf.3/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#26 /srv/mediawiki/php-1.37.0-wmf.3/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#27 /srv/mediawiki/php-1.37.0-wmf.3/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#28 /srv/mediawiki/w/rest.php(3): require(string)
#29 {main}
Impact
Notes

Details

Request URL
https://commons.wikimedia.org/w/rest.php/commons.wikimedia.org/v3/page/pagebundle/Herbarium_of_Baltimore_Woods/557659834

Event Timeline

ssastry triaged this task as Medium priority.May 4 2021, 11:11 PM
ssastry created this task.
Krinkle renamed this task from Wikimedia\Assert\InvariantException: Invariant failed: Expected an element to Invariant failed: Expected an element (from Parsoid DOMUtils).May 12 2021, 6:25 PM
Krinkle moved this task from Untriaged to May 2021 on the Wikimedia-production-error board.
Arlolra moved this task from Bugs & Crashers to Linting on the Parsoid board.
Arlolra added a subscriber: Arlolra.

This can be isolated to,

{{Herbarium of Baltimore Woods table
|genus=Humulus
|family=Cannabaceae
}}
|{{Herbarium of Baltimore Woods specimen
|species-name=Humulus lupulus
|author-name=L.
|var-name=lupulus<ref>Could possibly be ''Humulus lupulus'' var. ''lupuloides'' (native northeastern American hops), but that's less likely.</ref>
|common-name=European hops, common hop
|nativity=Introduced from Eurasia
|ntz=Cultivated, naturalized
|nwi=FACU
|fny-link=Rhamnaceae_…_Urticaceae#Humulus
|image-name=Humulus lupulus var. lupulus BW-1979-1001-0438.jpg
|orig-species=Humulus lupulus
|orig-author=L.
|orig-common=Common hop
|orig-habitat=Openings
|orig-date=Oct. 1, 1979
}}
|}

Expanding the template, you get to the problematic content model violation of a-in-a, from the reference in the wikilink content,

[[b:Flora_of_New_York/Rhamnaceae_…_Urticaceae#Humulus|'''''lupulus<ref>Could possibly be ''Humulus lupulus'' var. ''lupuloides'' (native northeastern American hops), but that's less likely.</ref>''''']]

Maybe we'll want to lint those away?