Page MenuHomePhabricator

Wikibase\Lib\Store\RevisionedUnresolvedRedirectException: Unresolved redirect from Q12300645 to Q9391534
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikibase\Lib\Store\RevisionedUnresolvedRedirectException: Unresolved redirect from Q12300645 to Q9391534
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php(117)
#0/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(52)Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#1/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/data-access/src/ByTypeDispatchingEntityRevisionLookup.php(54)Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#2/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(99)Wikibase\DataAccess\ByTypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#3/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(85)Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#4/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(99)Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#5/srv/mediawiki/php-1.44.0-wmf.14/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(85)Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, int, string)
#6/srv/mediawiki/php-1.44.0-wmf.14/extensions/Math/src/MathWikibaseConnector.php(335)Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId)
#7/srv/mediawiki/php-1.44.0-wmf.14/extensions/Math/src/MathWikibaseConnector.php(310)MediaWiki\Extension\Math\MathWikibaseConnector->fetchPageUrl(Wikibase\DataModel\Entity\ItemId)
#8/srv/mediawiki/php-1.44.0-wmf.14/extensions/Math/src/MathWikibaseConnector.php(249)MediaWiki\Extension\Math\MathWikibaseConnector->fetchHasPartSnaks(MediaWiki\Extension\Math\MathWikibaseInfo, Wikibase\DataModel\Statement\StatementList, Wikibase\Lib\Store\DispatchingFallbackLabelDescriptionLookup)
#9/srv/mediawiki/php-1.44.0-wmf.14/extensions/Math/src/MathWikibaseConnector.php(202)MediaWiki\Extension\Math\MathWikibaseConnector->fetchStatements(MediaWiki\Extension\Math\MathWikibaseInfo, Wikibase\DataModel\Entity\Item, Wikibase\Lib\Store\DispatchingFallbackLabelDescriptionLookup)
#10/srv/mediawiki/php-1.44.0-wmf.14/extensions/Math/src/Rest/Popup.php(61)MediaWiki\Extension\Math\MathWikibaseConnector->fetchWikibaseFromId(string, string)
#11/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/SimpleHandler.php(40)MediaWiki\Extension\Math\Rest\Popup->run(int)
#12/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/Module/Module.php(415)MediaWiki\Rest\SimpleHandler->execute()
#13/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/Module/Module.php(298)MediaWiki\Rest\Module\Module->executeHandler(MediaWiki\Extension\Math\Rest\Popup)
#14/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/Router.php(485)MediaWiki\Rest\Module\Module->execute(string, MediaWiki\Rest\RequestFromGlobals)
#15/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/Router.php(444)MediaWiki\Rest\Router->doExecute(string, MediaWiki\Rest\RequestFromGlobals)
#16/srv/mediawiki/php-1.44.0-wmf.14/includes/Rest/EntryPoint.php(209)MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#17/srv/mediawiki/php-1.44.0-wmf.14/includes/MediaWikiEntryPoint.php(202)MediaWiki\Rest\EntryPoint->execute()
#18/srv/mediawiki/php-1.44.0-wmf.14/rest.php(39)MediaWiki\MediaWikiEntryPoint->run()
#19/srv/mediawiki/w/rest.php(3)require(string)
#20{main}
Impact
Notes

Details

Request URL
https://it.wikipedia.org/w/rest.php/math/v0/popup/html/41299
Related Changes in Gerrit:

Event Timeline

@Lucas_Werkmeister_WMDE Do you think an exception handler within the Math extension is the solution? You can assign the task to me in that case.

I haven’t looked at it closely enough to have an opinion on that, I just saw Math in the stack trace and thought it should be on that board as well. That said, from a very quick look now, the EntityRevisionLookup::getEntityRevision() method you call in MathWikibaseConnector::fetchPageUrl() documents that it can throw this exception type, so I suspect this is expected from the Wikibase side and handling this case is supposed to be up to the caller. (I don’t know whether that means catching the exception, trying to resolve the redirect before calling the method in the first place, or something else.)

Change #1118488 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Handle RevisionedUnresolvedRedirectException

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

I have suggested a simple fix that extends the existing try-catch statement. I believe that there is a script/bot that changes the referencing QIDs in the properties to the new location. Thus, it did not seem adequate for me to implement special redirect handling. I think if that would be desired, it should not be implemented in the Math extension but in Wikdiata, as the fact that items are merged and that properties link to merged items is not specific to Math properties.

Change #1118488 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Handle RevisionedUnresolvedRedirectException

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

@Lucas_Werkmeister_WMDE This should be fixed now. The exception was originally not handled as the documentation says

If a $revisionId is given, the requested revision of the entity is loaded. If that revision does not exist or does not belong to the given entity, an exception is thrown.

Maybe that could be extended?

If a $revisionId is given, the requested revision of the entity is loaded. Otherwise, the $revisionId is computed. ...

Change #1130237 had a related patch set uploaded (by Krinkle; author: Physikerwelt):

[mediawiki/extensions/Math@REL1_43] Handle RevisionedUnresolvedRedirectException

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

Change #1130237 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Handle RevisionedUnresolvedRedirectException

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