Page MenuHomePhabricator

PHP Notice: Trying to get property 'firstChild' of non-object
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.35

message
PHP Notice: Trying to get property 'firstChild' of non-object

Impact

Notes

Details

Request URL
https://de.wikipedia.org/w/rest.php/de.wikipedia.org/v3/page/pagebundle/Benutzer%3APedalito/210027269
Stack Trace
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/AddMediaInfo.php(615)
#0 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/AddMediaInfo.php(615): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(158): Wikimedia\Parsoid\Wt2Html\PP\Processors\AddMediaInfo->run(Wikimedia\Parsoid\Config\Env, DOMElement, array, boolean)
#2 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(837): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(DOMElement, array, boolean)
#3 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(887): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(DOMElement)
#4 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(904): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(DOMElement)
#5 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#6 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(310): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#7 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#8 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Parsoid.php(162): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#9 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/src/Parsoid.php(194): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#10 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(589): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#11 /srv/mediawiki/php-1.36.0-wmf.35/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(88): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array)
#12 /srv/mediawiki/php-1.36.0-wmf.35/includes/Rest/Router.php(395): MWParsoid\Rest\Handler\PageHandler->execute()
#13 /srv/mediawiki/php-1.36.0-wmf.35/includes/Rest/Router.php(322): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#14 /srv/mediawiki/php-1.36.0-wmf.35/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#15 /srv/mediawiki/php-1.36.0-wmf.35/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#16 /srv/mediawiki/php-1.36.0-wmf.35/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#17 /srv/mediawiki/w/rest.php(3): require(string)
#18 {main}

Event Timeline

Arlolra triaged this task as Medium priority.
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.
Arlolra added a subscriber: Arlolra.

Isolated,

*{{Audio|DE Siebenbuergen article.ogg|Siebenbürgen}
*[[Datei:Qsicon Exzellent.svg|12px]]
}}

This is a case of media in media link,

[[Media:DE Siebenbuergen article.ogg| [[Datei:Qsicon Exzellent.svg]] ]]

Media links don't use fragments so it doesn't get the benefit of preserving the structure while unpacking.

Change 674156 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Handle media misnested in media links

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

Change 674157 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] [WIP] Tunnel mw:MediaLink content

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

This is a case of media in media link,

We probably need a lint for this as in T248369

Change 674156 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Log an error if media structure is messed up

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

Change 674157 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Handle wikilinks misnested in media links

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

Change 675310 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a30

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

Change 675738 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):
[mediawiki/vendor@wmf/1.36.0-wmf.37] Bump wikimedia/parsoid to 0.13.0-a30

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

Change 675310 merged by jenkins-bot:
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a30

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

Change 675738 merged by jenkins-bot:
[mediawiki/vendor@wmf/1.36.0-wmf.37] Bump wikimedia/parsoid to 0.13.0-a30

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