(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

PHP Notice: Undefined index: link-recommendation
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined index: link-recommendation
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.25/extensions/GrowthExperiments/includes/UserImpact/ComputedUserImpactLookup.php(290)
#0 /srv/mediawiki/php-1.40.0-wmf.25/extensions/GrowthExperiments/includes/UserImpact/ComputedUserImpactLookup.php(290): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.40.0-wmf.25/extensions/GrowthExperiments/includes/UserImpact/ComputedUserImpactLookup.php(137): GrowthExperiments\UserImpact\ComputedUserImpactLookup->getEditData(User, integer)
#2 /srv/mediawiki/php-1.40.0-wmf.25/extensions/GrowthExperiments/includes/MentorDashboard/PersonalizedPraise/PersonalizedPraiseHooks.php(56): GrowthExperiments\UserImpact\ComputedUserImpactLookup->getUserImpact(User)
#3 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/MWCallableUpdate.php(38): GrowthExperiments\MentorDashboard\PersonalizedPraise\PersonalizedPraiseHooks->GrowthExperiments\MentorDashboard\PersonalizedPraise\{closure}()
#4 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdates.php(473): MWCallableUpdate->doUpdate()
#5 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdates.php(398): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#6 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdates.php(213): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, MediaWiki\JobQueue\JobQueueGroupFactory, string)
#7 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdatesScope.php(267): DeferredUpdates::{closure}(MWCallableUpdate, integer)
#8 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdatesScope.php(196): DeferredUpdatesScope->processStageQueue(integer, integer, Closure)
#9 /srv/mediawiki/php-1.40.0-wmf.25/includes/deferred/DeferredUpdates.php(234): DeferredUpdatesScope->processUpdates(integer, Closure)
#10 /srv/mediawiki/php-1.40.0-wmf.25/includes/MediaWiki.php(1118): DeferredUpdates::doUpdates()
#11 /srv/mediawiki/php-1.40.0-wmf.25/includes/MediaWiki.php(849): MediaWiki->restInPeace()
#12 /srv/mediawiki/php-1.40.0-wmf.25/api.php(125): MediaWiki->doPostOutputShutdown()
#13 /srv/mediawiki/php-1.40.0-wmf.25/api.php(45): wfApiMain()
#14 /srv/mediawiki/w/api.php(3): require(string)
#15 {main}
Impact

Severe, none suggested edit task can be completed in arwiki.

Notes

616 of these in the last 7 days. Started with wmf.25.

Related Objects

Event Timeline

kostajh triaged this task as High priority.Mar 8 2023, 12:37 PM
kostajh updated the task description. (Show Details)
kostajh added a subscriber: Urbanecm_WMF.

$editCountByTaskType = array_fill_keys( array_keys( $this->configurationLoader->getTaskTypes() ), 0 ); should fill that array with an index for link-recommendation. The error happens a bit farther down:

// @phan-suppress-next-line PhanTypeMismatchDimFetchNullable False 
$editCountByTaskType[$taskTypeId]++;

Change 895819 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Leveling up: check if the task type is registered before increasing its edit count

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

@Dyolf77_WMF - just FYI there are issues with Suggested Editrs on arwiki currently. We are working on a fix ASAP.

Change 895776 had a related patch set uploaded (by Gergő Tisza; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.26] Leveling up: check if the task type is registered before increasing its edit count

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

Change 895777 had a related patch set uploaded (by Gergő Tisza; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.25] Leveling up: check if the task type is registered before increasing its edit count

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

Change 895819 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Leveling up: check if the task type is registered before increasing its edit count

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

Change 895777 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.25] Leveling up: check if the task type is registered before increasing its edit count

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

Change 895776 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.26] Leveling up: check if the task type is registered before increasing its edit count

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

That doesn't seem to be the case, from looking at Special:RecentChanges

"PHP Notice" usually means that the PHP engine was able to ignore the error in some way; in case of undefined things, by using null instead (which due to PHP's type juggling is pretty much the same as 0, which would have been the correct value here). So I don't think there was any user impact.

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:30:45Z] <tgr@deploy2002> Started scap: Backport for [[gerrit:895776|Leveling up: check if the task type is registered before increasing its edit count (T331524)]], [[gerrit:895777|Leveling up: check if the task type is registered before increasing its edit count (T331524)]]

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:32:27Z] <tgr@deploy2002> tgr: Backport for [[gerrit:895776|Leveling up: check if the task type is registered before increasing its edit count (T331524)]], [[gerrit:895777|Leveling up: check if the task type is registered before increasing its edit count (T331524)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-03-08T22:39:17Z] <tgr@deploy2002> Finished scap: Backport for [[gerrit:895776|Leveling up: check if the task type is registered before increasing its edit count (T331524)]], [[gerrit:895777|Leveling up: check if the task type is registered before increasing its edit count (T331524)]] (duration: 08m 31s)

PHP engine was able to ignore the error in some way

Apologies for the wrong assumption or wording, it's based on a local test. I think the edit saves may go through but the feedback on the save dialog was "Invalid response from server".

PHP engine was able to ignore the error in some way

Apologies for the wrong assumption or wording, it's based on a local test. I think the edit saves may go through but the feedback on the save dialog was "Invalid response from server".

Ah, interesting. If you are still able to reproduce this, can you check the network logs and see what is in the VisualEditor API response?

Etonkovidova subscribed.

The errors seem to stopped with the most recent timestamp - Mar 8, 2023 @ 21:44:12.281 (logstash link).

Screen Shot 2023-03-15 at 11.23.15 AM.png (508×2 px, 111 KB)

Apologies for the wrong assumption or wording, it's based on a local test. I think the edit saves may go through but the feedback on the save dialog was "Invalid response from server".

FWIW what probably happened is that your development setup is configured to print errors, and the method was also invoked in a non-deferred way in some API, so the PHP notice was output in front of the JSON response and the browser could not parse it.