Page MenuHomePhabricator

Special:Upload fails on a space as destination filename
Closed, ResolvedPublic


Steps to reproduce:

Actual result:

  • The spinner does not stop.
  • In the JavaScript console the error TypeError: result.query is undefined occurs.

The API request returns


The expected key query is missing in the response.

Event Timeline

Fomafix created this task.Jan 21 2018, 12:22 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 21 2018, 12:22 AM
Fomafix claimed this task.Jan 21 2018, 12:22 AM

Change 405557 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] mediawiki.special.upload: trim nameToCheck

Anomie added a subscriber: Anomie.

The API request returns


The expected key query is missing in the response.

The API treats a whitespace-only value for a multi-value parameter the same as an empty value; this behavior was added in rSVN32224. I don't know why it was done that way instead of only treating a zero-length string as empty.

The query key being absent when no titles are supplied also is longstanding API behavior, and is already filed as T33901: API: action=query with empty title set should still respond with "query" element. See that task for further discussion.

The trimming of the title and the missing query key without an error seams both to be very inconsistent.

Change 405557 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.special.upload: trim nameToCheck

Umherirrender closed this task as Resolved.Mar 16 2018, 6:04 PM
Umherirrender triaged this task as Medium priority.