Page MenuHomePhabricator

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



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



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

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 (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?

Qgil added a comment.Dec 24 2013, 10:26 PM

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

Qgil added a comment.Dec 27 2013, 6:07 AM

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:

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:

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

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

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

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

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