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⧽"

Details

Related Gerrit Patches:

Event Timeline

A2093064 created this task.Aug 29 2018, 6:10 AM
Restricted Application added subscribers: Cosine02, Aklapper. · View Herald TranscriptAug 29 2018, 6:10 AM
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)

Confirming. After clicking "Upload file" the call goes to
https://zh.wikipedia.org/w/api.php?action=query&format=json&errorformat=html&errorlang=en&errorsuselocal=1&formatversion=2&meta=userinfo&uiprop=groups%7Crights

On other sites like cs.wp I get the expected File Upload dialog.

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:


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

Restricted Application added a project: Multimedia. · View Herald TranscriptAug 1 2019, 2:35 AM

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

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

matmarex closed this task as Resolved.Aug 1 2019, 3:39 AM
matmarex claimed this task.
Shizhao moved this task from Backlog to Closed on the Chinese-Sites board.