Page MenuHomePhabricator

Improve error message when importing a file that is actually on a remote repo
Closed, InvalidPublic2 Estimated Story Points

Description

Reproduce:

Result:

"Can't import a missing file."

image.png (397×947 px, 39 KB)

Expected Result:

"Can't import file because it is actually hosted on <name of the repo, e.g. Wikimedia Commons>"?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

So the pageInfoData is as follows:

array (size=6)
  'ns' => int 6
  'title' => string 'File:Ice and Snow World-Sculpture Festival 8.webm' (length=49)
  'missing' => string '' (length=0)
  'known' => string '' (length=0)
  'imagerepository' => string 'wikimediacommons' (length=16)
  'imageinfo' => 
    array (size=1)
      0 => 
        array (size=17)
          'timestamp' => string '2018-01-23T19:08:53Z' (length=20)
          'user' => string 'Techyan' (length=7)
          'userid' => int 0
          'anon' => string '' (length=0)
          'size' => int 97210846
          'width' => int 1920
          'height' => int 1080
          'duration' => float 32.537
          'comment' => string 'Videoconvert upload from toollabs' (length=33)
          'canonicaltitle' => string 'File:Ice and Snow World-Sculpture Festival 8.webm' (length=49)
          'thumburl' => string 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Ice_and_Snow_World-Sculpture_Festival_8.webm/711px--Ice_and_Snow_World-Sculpture_Festival_8.webm.jpg' (length=158)
          'thumbwidth' => int 711
          'thumbheight' => int 400
          'url' => string 'https://upload.wikimedia.org/wikipedia/commons/0/08/Ice_and_Snow_World-Sculpture_Festival_8.webm' (length=96)
          'descriptionurl' => string 'https://commons.wikimedia.org/wiki/File:Ice_and_Snow_World-Sculpture_Festival_8.webm' (length=84)
          'descriptionshorturl' => string 'https://commons.wikimedia.org/w/index.php?curid=65770268' (length=56)
          'sha1' => string 'a89ce83b0d579597490c7ebdc29f7d2d91a6edd7' (length=40)

We can probably improve this error message to say that the file can not be imported as it comes from remote imagerepository rather than the local site.

We could also name the image repository which is listed in the imagerepository key

Addshore renamed this task from https://en.wikipedia.beta.wmflabs.org/wiki/File:Ice_and_Snow_World-Sculpture_Festival_8.webm can not be imported on beta to Improve error message when importing a file that is actually on a remote repo.Jan 26 2018, 5:23 PM
Addshore updated the task description. (Show Details)
Addshore added a project: WMDE-Design.
Addshore added a subscriber: Lea_WMDE.

@Lea_WMDE I have updated the description and currently left a message of "Can't import file because it is actually hosted on a remote site"? But this message decision should probably come from you / UX

The api does give us the following:

'imagerepository' => string 'wikimediacommons' (length=16)

That we could include in the error message.

@Lea_WMDE @Addshore

What credentials do you use to log in? And are all new things tested there? Because In the [wish] document it says that the test server is this one: http://mwfileimport.wmflabs.org/wiki/index.php/Special:ImportFile

@Lea_WMDE @Addshore

What credentials do you use to log in? And are all new things tested there? Because In the [wish] document it says that the test server is this one: http://mwfileimport.wmflabs.org/wiki/index.php/Special:ImportFile

So the code on master is now deployed to beta when merged so the best place to check is https://test.wikimedia.beta.wmflabs.org/wiki/Special:ImportFile

We should probably get rid of the test instance / site now.

@Addshore and what can I use to log in there?

You can just make any old account, the accounts on the beta cluster are separate to all other accounts.
Note the note on the main page, https://deployment.wikimedia.beta.wmflabs.org/wiki/Main_Page, "For security, we recommend you use a password different from your Wikimedia one."

Oki doki. I was thinking maybe we have a separate login for it like for wmflabs. Thanks!

awight lowered the priority of this task from Medium to Low.Sep 10 2019, 9:41 PM
awight moved this task from WMDE-design tasks to Backlog on the Move-Files-To-Commons board.
awight subscribed.

This is a rare error, deprioritizing.

I can't reproduce this error. Is it still a problem or can it be closed?

WMDE-Fisch removed a project: TestMe.
WMDE-Fisch subscribed.

I can't reproduce this error. Is it still a problem or can it be closed?

Thanks for looking into this and the poke. These cases are indeed handled differently right now. So in any way the issue described in this ticket is invalid now.