Page MenuHomePhabricator

PHP Notice: Undefined property: stdClass::$href
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined property: stdClass::$href
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSectionsState.php(177)
#0 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSectionsState.php(177): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSectionsState.php(313): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSectionsState->computeSectionMetadata(Wikimedia\Parsoid\Core\SectionMetadata, Wikimedia\Parsoid\DOM\Element, integer)
#2 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSectionsState.php(418): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSectionsState->createNewSection(Wikimedia\Parsoid\DOM\Element, array, Wikimedia\Parsoid\Wt2Html\PP\Processors\Section, Wikimedia\Parsoid\DOM\Element, integer, boolean)
#3 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSectionsState.php(781): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSectionsState->wrapSectionsInDOM(Wikimedia\Parsoid\Wt2Html\PP\Processors\Section, Wikimedia\Parsoid\DOM\Element)
#4 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(31): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSectionsState->run()
#5 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(157): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->run(Wikimedia\Parsoid\Config\Env, Wikimedia\Parsoid\DOM\Element, array, boolean)
#6 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(868): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(Wikimedia\Parsoid\DOM\Element, array, boolean)
#7 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(909): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(Wikimedia\Parsoid\DOM\Element)
#8 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(927): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(Wikimedia\Parsoid\DOM\Element)
#9 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(180): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#10 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(299): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#11 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Wikitext/ContentModelHandler.php(124): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#12 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Parsoid.php(174): Wikimedia\Parsoid\Wikitext\ContentModelHandler->toDOM(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI)
#13 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/src/Parsoid.php(216): Wikimedia\Parsoid\Parsoid->parseWikitext(MediaWiki\Parser\Parsoid\Config\PageConfig, Wikimedia\Parsoid\Config\StubMetadataCollector, array)
#14 /srv/mediawiki/php-1.40.0-wmf.23/includes/parser/Parsoid/ParsoidOutputAccess.php(298): Wikimedia\Parsoid\Parsoid->wikitext2html(MediaWiki\Parser\Parsoid\Config\PageConfig, array)
#15 /srv/mediawiki/php-1.40.0-wmf.23/includes/parser/Parsoid/ParsoidOutputAccess.php(463): MediaWiki\Parser\Parsoid\ParsoidOutputAccess->parseInternal(MediaWiki\Parser\Parsoid\Config\PageConfig, array)
#16 /srv/mediawiki/php-1.40.0-wmf.23/includes/parser/Parsoid/ParsoidOutputAccess.php(244): MediaWiki\Parser\Parsoid\ParsoidOutputAccess->parse(MediaWiki\Page\PageStoreRecord, ParserOptions, array, MediaWiki\Revision\RevisionStoreRecord)
#17 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(689): MediaWiki\Parser\Parsoid\ParsoidOutputAccess->getParserOutput(MediaWiki\Page\PageStoreRecord, ParserOptions, MediaWiki\Revision\RevisionStoreRecord, integer)
#18 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(519): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->getParserOutputInternal(ParserOptions)
#19 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(612): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->getParserOutput()
#20 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Handler/ParsoidHandler.php(870): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->getPageBundle()
#21 /srv/mediawiki/php-1.40.0-wmf.23/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(92): MediaWiki\Rest\Handler\ParsoidHandler->wt2html(MediaWiki\Parser\Parsoid\Config\PageConfig, array)
#22 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Router.php(515): MWParsoid\Rest\Handler\PageHandler->execute()
#23 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/Router.php(421): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#24 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/EntryPoint.php(195): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#25 /srv/mediawiki/php-1.40.0-wmf.23/includes/Rest/EntryPoint.php(135): MediaWiki\Rest\EntryPoint->execute()
#26 /srv/mediawiki/php-1.40.0-wmf.23/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#27 /srv/mediawiki/w/rest.php(3): require(string)
#28 {main}
Impact
Notes
  • 600+ in the last hour, seems to all be on mediawikiwiki

Event Timeline

Change 889551 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WIP: Deal with parser functions generating headings

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

This is new (but unused by anything) functionality. This notice doesn't cause any user facing errors anywhere. So, I recommend suppressing this error in the log to eliminate noise during deployment.

But, I'll check with @cscott if we want to do a new parsoid release, etc.

You will also see: PHP Notice: Trying to get property 'template' of non-object and PHP Notice: Undefined property: stdClass::$parts and PHP Notice: Trying to access array offset on value of type null -- all stemming from the same 4 lines of code as the one above.

The patch above fixes all of these notices, but we just need to decide if we want to wait till next week to deploy this OR release parsoid, vendor, etc ... we haven't done this before.

As a quick-and-dirty backport fix we could also just comment out the call to ::computeSectionMetadata() too, couldn't we? That information isn't used by anything yet. That would give us more time to do a proper fix incl test case for the next train.

We'd still need to make that one-line change on a branch, tag a new parsoid, and backport it to mediawiki-vendor. Up to ops whether they feel that's worth doing -vs- just suppressing the three log messages for one week.

NOT: /srv/parsoid-testing/src/Wt2Html/PP/Processors/WrapSectionsState.php:177 and NOT: /srv/parsoid-testing/src/Wt2Html/PP/Processors/WrapSectionsState.php:171 will filter out all the logs from the broken code afact. So, that is the simplest option to narrowly filter out only errors form this patch and have this fixed next train.

Zabe triaged this task as Unbreak Now! priority.Feb 15 2023, 7:25 PM

Change 889637 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Temporarily suppress TOC data

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

Change 889637 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Temporarily suppress TOC data

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

Change 889641 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.17.0-a16

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

Change 889641 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.17.0-a16

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

Change 889607 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):

[mediawiki/vendor@wmf/1.40.0-wmf.23] Bump wikimedia/parsoid to 0.17.0-a16

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

Change 889607 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.40.0-wmf.23] Bump wikimedia/parsoid to 0.17.0-a16

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

Mentioned in SAL (#wikimedia-operations) [2023-02-15T22:55:50Z] <dduvall@deploy1002> Started scap: Backport for [[gerrit:889607|Bump wikimedia/parsoid to 0.17.0-a16 (T329740)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-15T22:57:42Z] <dduvall@deploy1002> cscott and dduvall: Backport for [[gerrit:889607|Bump wikimedia/parsoid to 0.17.0-a16 (T329740)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-15T23:04:37Z] <dduvall@deploy1002> Finished scap: Backport for [[gerrit:889607|Bump wikimedia/parsoid to 0.17.0-a16 (T329740)]] (duration: 08m 47s)

ssastry claimed this task.

Change 891597 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Re-enable TOC data

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

Change 889551 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Deal with parser functions generating headings

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

Change 891597 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Re-enable TOC data

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

Change 896413 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@master] Bump parsoid to 0.17.0-a20 and zest-css to 3.0.0

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

Change 896413 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.17.0-a20 and zest-css to 3.0.0

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