Page MenuHomePhabricator

On page for files that don't exist, edit icon shouldn't open editor for articles
Closed, ResolvedPublic

Description

Author: andrew.green.df

Description:
If you go to the page of a file that doesn't exist, you get this message: "No file by this name exists, but you can upload it." The message includes a nice link to Special:Upload. However, on the same page, the pencil icon opens the editor. Instead, it should probably take you to Special:Upload instead.


Version: unspecified
Severity: enhancement
Whiteboard: gci2013
URL: http://www.google-melange.com/gci/task/view/google/gci2013/5234875657355264

Details

Reference
bz58311

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:41 AM
bzimport set Reference to bz58311.

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1497

Kenan / designers what do you think?

I think we should have an upload icon for this case rather than an edit icon.

Jared so how about this as a first step:
Visiting https://en.m.wikipedia.org/wiki/File:Foozajashsaash.png (a file that doesn't exist)
shows a page actions bar without an edit button. Clicking upload starts the normal upload workflow but saves it to the same file name as given in the URL?

Quim this could be a good task for Google Code in.

(upload being the existing upload icon in the page action bar)

That sounds fine, we could suppress the normal edit icon in this case? also we'd switch the image icon not to be the locked state, correct?

Created a GCI task. Please leave the task as clear as possible to the eventual CI student. Thank you!

jaredflores2000 wrote:

Just to be clear, is this what you want?
-Disable the edit button and switch the icon to the disabled edit icon
-Unlock the upload button, and trigger the normal upload workflow

Yes JaredF, this is what I also understand.

fyi, Jared Flores is a Google Code-in student that has started working on this task.

jaredflores2000 wrote:

Hi,
Where exactly would I find the handling for non-existent files in MobileFrontend? I've been told it might be in \includes\skins\SkinMobileBeta.php, but I've been at a loss of where to find it.
Thanks in Advanced,
Jared Flores

jaredflores2000 wrote:

Nevermind, I believe I've found it. Patch will be uploaded once my testing environment starts working again

jaredflores2000 wrote:

Hi,
I've managed to disable the edit button already, but what exactly would you like me to do with the upload button?
I've already unlocked it, but I'm not sure where to go from there. Do you want me to link the button with Special:Upload? Or would you like me to modify the PhotoUpload.js to include a function for non-existent files. The latter is a tad bit harder, but if that's what you would like, I'll do it
Thanks in Advanced,
Jared Flores

Change 104324 had a related patch set uploaded by Jcf2000:
On "File does not exist" disable edit, enable upload

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

Change 104324 abandoned by Jdlrobson:
On "File does not exist" disable edit, enable upload

Reason:
At request of submitter. Feel free to re-open this or use as a basis for a future fix to this problem! :)

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

Change 134589 had a related patch set uploaded by Florianschmidtwelzow:
Implement upload via "Add image" on New file pages

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

Change 134589 merged by jenkins-bot:
Implement upload via "Add image" on New file pages

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