Page MenuHomePhabricator

Trying to upload image under blacklisted title in the upload image dialog throws error "<api-error-titleblacklist-custom-imagename>"
Closed, ResolvedPublic1 Story Points

Description

Steps to reproducible:

  1. Go to Media Settings>Upload

2.Select and image
3.No w from the Details dialog change the name of the image to make it customized
4.Click on "Save" on the dialog

Observed Result:
A not so understandable error "<api-error-titleblacklist-custom-imagename>" shows up on the dialog

Event Timeline

Ryasmeen created this task.Oct 7 2015, 7:56 PM
Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a project: VisualEditor.
Ryasmeen added a subscriber: Ryasmeen.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2015, 7:56 PM
matmarex added a subscriber: matmarex.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptOct 8 2015, 12:37 AM

Change 244429 had a related patch set uploaded (by Prtksxna):
i18n: Add message api-error-titleblacklist-custom-imagename

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

Prtksxna claimed this task.Oct 8 2015, 12:11 PM
Prtksxna reassigned this task from Prtksxna to matmarex.Oct 8 2015, 1:37 PM
Prtksxna added a subscriber: Prtksxna.

Change 244429 abandoned by Bartosz Dziewoński:
i18n: Add message api-error-titleblacklist-custom-imagename

Reason:
Different approach needed.

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

matmarex set Security to None.

Change 244512 had a related patch set uploaded (by Bartosz Dziewoński):
mw.Upload: Refactor error handling for the umpteenth time

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

matmarex renamed this task from Trying to change the name of the image in the upload image dialog throws error "<api-error-titleblacklist-custom-imagename>" to Trying to upload image under blacklisted title in the upload image dialog throws error "<api-error-titleblacklist-custom-imagename>".Oct 8 2015, 8:57 PM

The patch above does not fix the issue yet (we're still not handling TitleBlacklist errors), but it lays some groundwork and makes the error message return all available information (such as Unknown error: "{"servedby":"deployment-mediawiki01","error":{"code":"senselessimagename","info":"TitleBlacklist prevents this title from being created","filekey":"13i5i0u8vv8w.5sc2g2.1252.jpg","sessionkey":"13i5i0u8vv8w.5sc2g2.1252.jpg","invalidparameter":"filename","*":"See http://commons.wikimedia.beta.wmflabs.org/w/api.php for API usage"}}".), which does at least mention that "TitleBlacklist prevents this title from being created".

matmarex triaged this task as High priority.Oct 9 2015, 11:48 AM

Change 244676 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.Upload.BookletLayout: Handle errors from TitleBlacklist (HACK)

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

It seems to be that devising and introducing a sane, non-hacky method to handle TitleBlacklist-blocked file names is something we should've planned at least several weeks in advance :/

Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.

Change 244512 merged by jenkins-bot:
mw.Upload: Refactor error handling for the umpteenth time

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

Jdforrester-WMF closed this task as Resolved.Oct 12 2015, 8:05 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

I think?

Change 244676 merged by jenkins-bot:
mediawiki.Upload.BookletLayout: Handle errors from TitleBlacklist (HACK)

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

You get this now (you can't verify on Beta because of T115302):

…just barely better. See T115260 about actually providing useful information.