Page MenuHomePhabricator

UploadWizard displays undefined message mwe-upwiz-fetching
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
During the actual publishing step, UploadWizard may show the message ⧼mwe-upwiz-fetching⧽:

Screenshot 2025-10-12 at 12-01-02 Upload Wizard - Wikimedia Commons.png (1×1 px, 627 KB)

What should have happened instead?:
A meaningful message should be shown.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
seen in 1.45.0-wmf.22 (though I don’t know if it’s new in this version)

Other information (browser name/version, screenshots, etc.):
I’m guessing it comes from this code.

Event Timeline

The code looks OK (possibly a bit hackish). But there should be a default message that it should display. That should be defined in here:

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/UploadWizard/+/refs/heads/master/i18n/en.json

But it isn't.

The patch needs to provide a default message for this.

The question is “what should this be?” It may, of course, be blank by default, if that's best.

Where does that fetching state even come from? It doesn't seem to be a greppable term in the repo...

@Reedy The stage is not coming from this codebase at all, mw.FormDataTransport, which is defined in resources/handlers/mw.ApiUploadFormDataHandler.js sends out the events based on the API response to the upload stash API (see mw.FormDataTransport.js:L383). The comment in the function says the following:

// Statuses that can be returned:
// * queued
// * publish
// * assembling

However, my assumption here is that the API has drifted from the comment since it was added. The only reference to 'fetching' in the mediawiki-core codebase is in UploadJobTrait::fetchFile which was added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/982757 (for T295007). I don't see a good place where all the stages of a file upload are documented, except for this switchcase in SpecialUpload.php, but even then it does not appear to mention the "assembling" stage even though there are still references to the assembling stage in the mediawiki-core codebase in ApiUpload.php and AssembleUploadChunksJob.php. Maybe @Joe or @Ladsgroup who worked on the "fetching" patch have more insight on what the values of stage can be?

Aha, yeah. So some of this is clearly from changes in MW Core that UploadWizard hasn't been updated to handle.

Screenshot 2025-10-12 at 22.37.15.png (425×746 px, 80 KB)

ApiUpload has an uploading stage too...