ApiParse Error
Request ID: W6G4wwrAIGEAALMp8yIAAADB
[{exception_id}] {exception_url} ErrorException from line 668 of /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiParse.php: PHP Notice: Undefined index: 1
#0 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiParse.php(668): MWExceptionHandler::handleError(integer, string, string, integer, array, array) #1 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiParse.php(371): ApiParse->formatLangLinks(array) #2 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(1587): ApiParse->execute() #3 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(531): ApiMain->executeAction() #4 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling() #5 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute()
private function formatLangLinks( $links ) { /* */ foreach ( $links as $link ) { /* */ $bits = explode( ':', $link, 2 ); /* */ ApiResult::setContentValue( $entry, 'title', $bits[1] );
LinksUpdate error
PHP Notice: Undefined index: 1 #0 /srv/mediawiki/php-1.32.0-wmf.22/includes/deferred/LinksUpdate.php(140): MWExceptionHandler::handleError(integer, string, string, integer, array, array) #1 /srv/mediawiki/php-1.32.0-wmf.22/includes/content/AbstractContent.php(238): LinksUpdate->__construct(Title, ParserOutput, boolean) #2 /srv/mediawiki/php-1.32.0-wmf.22/includes/Storage/DerivedPageDataUpdater.php(1313): AbstractContent->getSecondaryDataUpdates(Title, NULL, boolean, ParserOutput) #3 /srv/mediawiki/php-1.32.0-wmf.22/includes/Storage/DerivedPageDataUpdater.php(1549): MediaWiki\Storage\DerivedPageDataUpdater->getSecondaryDataUpdates(boolean) #4 /srv/mediawiki/php-1.32.0-wmf.22/includes/Storage/DerivedPageDataUpdater.php(1393): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array) #5 /srv/mediawiki/php-1.32.0-wmf.22/includes/Storage/PageUpdater.php(1193): MediaWiki\Storage\DerivedPageDataUpdater->doUpdates() #6 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(3746): Closure$MediaWiki\Storage\PageUpdater::getAtomicSectionUpdate(Wikimedia\Rdbms\DatabaseMysqli, string) #7 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(49): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$MediaWiki\Storage\PageUpdater::getAtomicSectionUpdate;2898) #8 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(529): Wikimedia\Rdbms\DBConnRef->__call(string, array) #9 /srv/mediawiki/php-1.32.0-wmf.22/includes/deferred/AtomicSectionUpdate.php(35): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure$MediaWiki\Storage\PageUpdater::getAtomicSectionUpdate;2898) #10 /srv/mediawiki/php-1.32.0-wmf.22/includes/deferred/DeferredUpdates.php(268): AtomicSectionUpdate->doUpdate() #11 /srv/mediawiki/php-1.32.0-wmf.22/includes/deferred/DeferredUpdates.php(226): DeferredUpdates::runUpdate(AtomicSectionUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer) #12 /srv/mediawiki/php-1.32.0-wmf.22/includes/deferred/DeferredUpdates.php(130): DeferredUpdates::execute(array, string, integer) #13 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(607): DeferredUpdates::doUpdates(string, integer) #14 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(548): MediaWiki::preOutputCommit(DerivativeContext) #15 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling() #16 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute() #17 /srv/mediawiki/w/api.php(3): include(string) #18 {main}
While this code is separate, it is a copy of what ApiParse contains. Depending on the fix will need to either be patched in two places, or both be fixed by the same common source.
Notes
Searching for message:"ApiParse.php" AND message:"Undefined index" shows that this error is newly introduced in 1.32.0-wmf.22. It did not exist previously.
Example url that triggers the above error in the backend: https://www.mediawiki.org/w/api.php?action=parse&page=Help%3ASubpages%2Fhi&format=json