Page MenuHomePhabricator

"PHP Notice: Undefined offset: 2" in WikitextEscapeHandlers
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

message
PHP Notice: Undefined offset: 2

Notes

Also, a PHP Notice: Undefined offset: 1 in same class but on line 717.
See logstash for other instances of these notices.

Details

Request ID
7b34fbe0-1941-11ea-a266-0d0050f50ceb
Request URL
https://az.wikipedia.org/w/rest.php/az.wikipedia.org/v3/transform/html/to/wikitext/Yuxu_tripanasomu
Stack Trace
exception.trace
#0 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextEscapeHandlers.php(718): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextEscapeHandlers.php(1024): Parsoid\Html2Wt\WikitextEscapeHandlers->escapedText(Parsoid\Html2Wt\SerializerState, boolean, string)
#2 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(217): Parsoid\Html2Wt\WikitextEscapeHandlers->escapeWikiText(Parsoid\Html2Wt\SerializerState, string, array)
#3 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/SerializerState.php(571): Parsoid\Html2Wt\WikitextSerializer->escapeWikiText(Parsoid\Html2Wt\SerializerState, string, array)
#4 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1091): Parsoid\Html2Wt\SerializerState->emitChunk(Parsoid\Html2Wt\ConstrainedText\ConstrainedText, DOMText)
#5 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1111): Parsoid\Html2Wt\WikitextSerializer->serializeText(string, DOMText, boolean)
#6 [internal function]: Parsoid\Html2Wt\WikitextSerializer->serializeTextNode(DOMText, Parsoid\Html2Wt\DOMHandlers\DOMHandler)
#7 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1372): call_user_func(array, DOMText, Parsoid\Html2Wt\DOMHandlers\DOMHandler)
#8 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/SerializerState.php(669): Parsoid\Html2Wt\WikitextSerializer->serializeNode(DOMText)
#9 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/DOMHandlers/PHandler.php(30): Parsoid\Html2Wt\SerializerState->serializeChildren(DOMElement)
#10 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1274): Parsoid\Html2Wt\DOMHandlers\PHandler->handle(DOMElement, Parsoid\Html2Wt\SerializerState, boolean)
#11 [internal function]: Parsoid\Html2Wt\WikitextSerializer->serializeDOMNode(DOMElement, Parsoid\Html2Wt\DOMHandlers\PHandler)
#12 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1372): call_user_func(array, DOMElement, Parsoid\Html2Wt\DOMHandlers\PHandler)
#13 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/SerializerState.php(669): Parsoid\Html2Wt\WikitextSerializer->serializeNode(DOMElement)
#14 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/SerializerState.php(692): Parsoid\Html2Wt\SerializerState->serializeChildren(DOMElement, NULL)
#15 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Html2Wt/WikitextSerializer.php(1645): Parsoid\Html2Wt\SerializerState->kickOffSerialize(DOMElement)
#16 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/WikitextContentModelHandler.php(109): Parsoid\Html2Wt\WikitextSerializer->serializeDOM(DOMElement)
#17 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/src/Parsoid.php(206): Parsoid\WikitextContentModelHandler->fromHTML(Parsoid\Config\Env, DOMDocument, NULL)
#18 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/extension/src/Rest/Handler/ParsoidHandler.php(826): Parsoid\Parsoid->html2wikitext(MWParsoid\Config\PageConfig, string, array, NULL)
#19 /srv/deployment/parsoid/deploy-cache/revs/0910e18d8477587cf44c17a2d500e0f73836c0a6/src/extension/src/Rest/Handler/TransformHandler.php(95): MWParsoid\Rest\Handler\ParsoidHandler->html2wt(Parsoid\Config\Env, array, string)
#20 /srv/mediawiki/php-1.35.0-wmf.5/includes/Rest/Router.php(315): MWParsoid\Rest\Handler\TransformHandler->execute()
#21 /srv/mediawiki/php-1.35.0-wmf.5/includes/Rest/Router.php(285): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#22 /srv/mediawiki/php-1.35.0-wmf.5/includes/Rest/EntryPoint.php(113): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#23 /srv/mediawiki/php-1.35.0-wmf.5/includes/Rest/EntryPoint.php(80): MediaWiki\Rest\EntryPoint->execute()
#24 /srv/mediawiki/php-1.35.0-wmf.5/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#25 /srv/mediawiki/w/rest.php(3): require(string)
#26 {main}

Event Timeline

ssastry created this task.Dec 8 2019, 3:17 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 8 2019, 3:17 AM
ssastry triaged this task as Medium priority.Dec 8 2019, 3:17 AM
ssastry moved this task from Backlog to Bugs, Notices, Crashers on the Parsoid-PHP board.

Change 556747 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Assert that escaped text matching succeeds

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

Arlolra claimed this task.Dec 12 2019, 5:38 PM

Change 556747 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Assert that escaped text matching succeeds

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

Arlolra closed this task as Resolved.Dec 13 2019, 3:20 PM