Page MenuHomePhabricator

"Stashing failed because rate limit was exceeded" (parsoid-stash-rate-limit-error) shown in various interfaces when the user is blocked
Closed, ResolvedPublic

Description

The error message "Stashing failed because rate limit was exceeded. Please try again later." (parsoid-stash-rate-limit-error) is shown in various interfaces when the user is blocked. This happens even when the rate limit has not been exceeded. I experienced this on English Wikipedia after my IP address has been falsely blocked as an open proxy.

This affects at least VisualEditor, visual diffs, and DiscussionTools new topic tool (but not DiscussionTools reply tool).

The error message is generated in MediaWiki core REST API here: https://gerrit.wikimedia.org/g/mediawiki/core/+/5206c70aee55840d76b33e85179e61843a224b4c/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php#435 so I think the problem lies there, rather than in the editing tools.

Expected behavior:

  • In tools that perform edits (VisualEditor, DiscussionTools), I should see the block message, not an unrelated error.
  • In tools that do not perform edits (e.g. visual diffs), there should be no error and no block message.
VisualEditor
image.png (2×3 px, 1 MB)
visual diffs
image.png (2×3 px, 478 KB)
DiscussionTools new topic tool
image.png (2×3 px, 573 KB)
DiscussionTools reply tool
image.png (2×3 px, 745 KB)

Event Timeline

Same error and possible same cause, but different question: T350117

Change 970754 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Revert "Rest: replace use of deprecated pingLimiter method"

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

Change 970754 merged by jenkins-bot:

[mediawiki/core@master] Revert "Rest: replace use of deprecated pingLimiter method"

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

In tools that perform edits (VisualEditor, DiscussionTools), I should see the block message, not an unrelated error.

The misleading error message is easily fixed. The deeper question is whether a check for the (implicite) "stashbasehtml" permission should return false for blocked users. I am now thinking that implicite rights should not be affected by blocks. I will work on a patch.

In tools that do not perform edits (e.g. visual diffs), there should be no error and no block message.

This indicates that visual diffs ask for the page content to be stashed for subsequent editing. That should not happen and should be treated as a bug. DirectParsoidClient::getPageHtml() in VE currently enables stashing unconditionally. If VisualDiff relies on that method, it would trigger stashing.

In tools that do not perform edits (e.g. visual diffs), there should be no error and no block message.

This indicates that visual diffs ask for the page content to be stashed for subsequent editing. That should not happen and should be treated as a bug. DirectParsoidClient::getPageHtml() in VE currently enables stashing unconditionally. If VisualDiff relies on that method, it would trigger stashing.

Maybe on diff view with diffonly=0 it is possible to directly edit the page as it is shown there. Maybe the error does not happen on diffonly=1 view as there is no content shown.
Not sure if the content after the diff is editable by the visual editor.

Change 970858 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Blocks should not apply to implicite rights.

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

Maybe on diff view with diffonly=0 it is possible to directly edit the page as it is shown there. Maybe the error does not happen on diffonly=1 view as there is no content shown.
Not sure if the content after the diff is editable by the visual editor.

Ok, but then the task description is wrong. It says:

In tools that do not perform edits (e.g. visual diffs), there should be no error and no block message.

In tools that do not perform edits (e.g. visual diffs), there should be no error and no block message.

This indicates that visual diffs ask for the page content to be stashed for subsequent editing. That should not happen and should be treated as a bug. DirectParsoidClient::getPageHtml() in VE currently enables stashing unconditionally. If VisualDiff relies on that method, it would trigger stashing.

Maybe on diff view with diffonly=0 it is possible to directly edit the page as it is shown there. Maybe the error does not happen on diffonly=1 view as there is no content shown.
Not sure if the content after the diff is editable by the visual editor.

Yeah, no, it looks like visual diff indeed unnecessarily asks for stashing, by using the same API as visual editor. I filed T350517 for it.

Change 970858 merged by jenkins-bot:

[mediawiki/core@master] block,Permissions: Blocks should not apply to implicit rights

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

Change 972002 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@REL1_41] block,Permissions: Blocks should not apply to implicit rights

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

Change 972002 merged by jenkins-bot:

[mediawiki/core@REL1_41] block,Permissions: Blocks should not apply to implicit rights

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

This has been fixed by the revert (https://gerrit.wikimedia.org/r/970754). The change will be deployed to Wikimedia wikis this week, on the usual schedule.