Page MenuHomePhabricator

UnexpectedValueException: Tried to submit link suggestion reviews which has already been reviewed.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   UnexpectedValueException: Tried to submit link suggestion reviews for revision "53277132" which has already been reviewed.
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.14/extensions/GrowthExperiments/includes/NewcomerTasks/AddLink/AddLinkSubmissionHandler.php(103)
#0 /srv/mediawiki/php-1.37.0-wmf.14/extensions/GrowthExperiments/includes/VisualEditorHooks.php(83): GrowthExperiments\NewcomerTasks\AddLink\AddLinkSubmissionHandler->run(Title, User, integer, NULL, array)
#1 /srv/mediawiki/php-1.37.0-wmf.14/includes/HookContainer/HookContainer.php(160): GrowthExperiments\VisualEditorHooks->onVisualEditorApiVisualEditorEditPostSave(MediaWiki\Page\PageIdentityValue, User, string, array, array, array, array)
#2 /srv/mediawiki/php-1.37.0-wmf.14/extensions/VisualEditor/includes/VisualEditorHookRunner.php(50): MediaWiki\HookContainer\HookContainer->run(string, array, array)
#3 /srv/mediawiki/php-1.37.0-wmf.14/extensions/VisualEditor/includes/ApiVisualEditorEdit.php(488): MediaWiki\Extension\VisualEditor\VisualEditorHookRunner->onVisualEditorApiVisualEditorEditPostSave(MediaWiki\Page\PageIdentityValue, User, string, array, array, array, array)
#4 /srv/mediawiki/php-1.37.0-wmf.14/includes/api/ApiMain.php(1842): ApiVisualEditorEdit->execute()
#5 /srv/mediawiki/php-1.37.0-wmf.14/includes/api/ApiMain.php(821): ApiMain->executeAction()
#6 /srv/mediawiki/php-1.37.0-wmf.14/includes/api/ApiMain.php(792): ApiMain->executeActionWithErrorHandling()
#7 /srv/mediawiki/php-1.37.0-wmf.14/api.php(90): ApiMain->execute()
#8 /srv/mediawiki/php-1.37.0-wmf.14/api.php(45): wfApiMain()
#9 /srv/mediawiki/w/api.php(3): require(string)
#10 {main}
Impact
  • only two errors ( both errors are on arwiki) are reported in logstash
  • a user will see the following warning

Screen Shot 2021-07-19 at 1.28.04 PM.png (1×1 px, 262 KB)

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The patch for T283109: Add link: Edits on Add link articles are automatically removed by subsequent Add link edits would probably make this less frequent (and in any case add a hook which makes checking for the problem easier).

kostajh triaged this task as Medium priority.Aug 18 2021, 7:55 AM

Change 699410 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] AddLink: Ensure revision has suggestions before saving

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

The patch for T283109: Add link: Edits on Add link articles are automatically removed by subsequent Add link edits would probably make this less frequent (and in any case add a hook which makes checking for the problem easier).

Yeah that patch should prevent this issue. I've tagged this task from the patch and am moving this task into code review as well.

Change 699410 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] AddLink: Ensure revision has suggestions before saving

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

Tested on testwiki wmf.20 for the scenario when the suggestion are not available for an article - "Back to suggested edits" message is displayed; the logstash doesn't have the errors present.