Page MenuHomePhabricator

Raw "apierror-permissiondenied" displayed instead of "You don't have permission to $1." in WikiEditor on zhwiki
Closed, ResolvedPublic

Description

Reproduce step:

  1. Edit any pages (Ex. https://zh.wikipedia.org/w/index.php?title=Wikipedia:%E6%B2%99%E7%9B%92&action=edit )
  2. Click "Embedded file"
  3. Click "Upload"
  4. Got message "⧼apierror-permissiondenied⧽"

Capture.PNG (171×824 px, 9 KB)

Event Timeline

Aklapper renamed this task from Non-autoconfirmed got message name instead of text when uploading file in edit box on zhwiki. to Raw "apierror-permissiondenied" displayed instead of "Upload file" dialog in WikiEditor on zhwiki.Aug 29 2018, 7:50 AM
Aklapper updated the task description. (Show Details)

If you have the "upload" permission, the "Upload file" dialog will be displayed correctly. For those users without "upload" right, It should display the message "You don't have permission to $1." instead of "apierror-permissiondenied".

Aklapper renamed this task from Raw "apierror-permissiondenied" displayed instead of "Upload file" dialog in WikiEditor on zhwiki to Raw "apierror-permissiondenied" displayed instead of "You don't have permission to $1." in WikiEditor on zhwiki.Aug 29 2018, 8:45 AM

This no longer affects zhwiki, since the upload dialog has been disabled via wiki configuration, now it shows the 'upload-dialog-disabled' message, which works correctly:

image.png (560×530 px, 17 KB)

But the bug is real, and it might affect other wikis, since we are actually not loading the 'apierror-permissiondenied' message.

Change 526824 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mediawiki.Upload.BookletLayout: Add missing message

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

Change 526824 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.Upload.BookletLayout: Add missing message

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

matmarex claimed this task.