Page MenuHomePhabricator

Parsoid Cite: PHP Notice: Undefined property: stdClass::$name
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.32

message
PHP Notice: Undefined property: stdClass::$name

Impact

Notes

Details

Request ID
YD@oGgpAAPEAAEtl2nAAAABK
Request URL
https://no.wikipedia.org/w/rest.php/no.wikipedia.org/v3/page/pagebundle/Wikipedia%3ATorget%2FArkiv%2F2016%2Fmai/20394932
Stack Trace
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(309)
#0 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(309): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(575): Wikimedia\Parsoid\Ext\Cite\References::extractRefFromNode(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, DOMElement, Wikimedia\Parsoid\Ext\Cite\ReferencesData)
#2 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(600): Wikimedia\Parsoid\Ext\Cite\References::processRefs(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, Wikimedia\Parsoid\Ext\Cite\ReferencesData, DOMElement)
#3 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(600): Wikimedia\Parsoid\Ext\Cite\References::processRefs(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, Wikimedia\Parsoid\Ext\Cite\ReferencesData, DOMElement)
#4 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(600): Wikimedia\Parsoid\Ext\Cite\References::processRefs(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, Wikimedia\Parsoid\Ext\Cite\ReferencesData, DOMElement)
#5 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/References.php(600): Wikimedia\Parsoid\Ext\Cite\References::processRefs(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, Wikimedia\Parsoid\Ext\Cite\ReferencesData, DOMElement)
#6 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Ext/Cite/RefProcessor.php(24): Wikimedia\Parsoid\Ext\Cite\References::processRefs(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, Wikimedia\Parsoid\Ext\Cite\ReferencesData, DOMElement)
#7 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(167): Wikimedia\Parsoid\Ext\Cite\RefProcessor->wtPostprocess(Wikimedia\Parsoid\Ext\ParsoidExtensionAPI, DOMElement, array, boolean)
#8 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(837): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(DOMElement, array, boolean)
#9 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(887): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(DOMElement)
#10 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(904): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(DOMElement)
#11 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#12 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(310): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#13 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#14 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Parsoid.php(162): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#15 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/src/Parsoid.php(194): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#16 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(589): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#17 /srv/mediawiki/php-1.36.0-wmf.32/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(88): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array)
#18 /srv/mediawiki/php-1.36.0-wmf.32/includes/Rest/Router.php(395): MWParsoid\Rest\Handler\PageHandler->execute()
#19 /srv/mediawiki/php-1.36.0-wmf.32/includes/Rest/Router.php(322): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#20 /srv/mediawiki/php-1.36.0-wmf.32/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#21 /srv/mediawiki/php-1.36.0-wmf.32/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#22 /srv/mediawiki/php-1.36.0-wmf.32/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#23 /srv/mediawiki/w/rest.php(3): require(string)
#24 {main}

Event Timeline

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/services/parsoid/+/refs/heads/master/src/Ext/Cite/References.php

				if ( $contentDiffers ) {
					// TODO: Since this error is being placed on the ref, the
					// key should arguably be "cite_error_ref_duplicate_key"
					$errs[] = [ 'key' => 'cite_error_references_duplicate_key',
						'params' => [ $refDmw->attrs->name ] ];
				}

The $refDmw->attrs->name was added with https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/649723 - T51538: Cite: Improve compatibility between Parsoid's port and the PHP extension

Hmm, yeah, I think the assumption was that we'd only be there if $ref->hasMultiples, which would imply having a name, but that's not true in the face of follows. Here's an isolated test case,

<ref name="test">123</ref>
<ref name="test">234</ref>
<ref follow="test">345</ref>
Arlolra triaged this task as Medium priority.
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

The crasher is from wmf32, so moved it to a prior column on the Wikmedia-production-error board. In reality, this is a crasher from a much older version, but I'll just leave it in that column for now.

Change 668225 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Check for multiples doesn't apply to follows

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

Change 668225 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Check for multiples doesn't apply to follows

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

Change 672528 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a27

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

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

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