Page MenuHomePhabricator

Editor workflow confusing on file namespace pages.
Closed, ResolvedPublic

Description

On the mobile site it is not possible to edit the lead section of file pages.

Clicking edit on https://en.m.wikipedia.org/wiki/File:El_Rodeo_(1917)_(42946).jpg throws a strange toast
Clicking edit on https://en.m.wikipedia.org/wiki/File:Example.jpg points to section 1 - not the full page

Original bug report

The Wikipedia image https://en.m.wikipedia.org/wiki/File:Refbegin_indent_Firefox.png had a bot add a copyright notice before the "Description" heading because I uploaded it without a license. I added a copyright tag, then tapped the edit icon at the top of the page to remove the bot message. In article space this starts editing the lead section. For whatever reason, the mobile frontend thinks the description page begins at the first heading, and that top-of-page edit link edits that section instead of the lead. As a result, there is no way to edit anything that goes there without reverting to desktop view.

Event Timeline

HairyDude renamed this task from Can't edit image description files before first section heading to Can't edit image description pages before first section heading.Oct 21 2017, 12:22 PM
Jdlrobson renamed this task from Can't edit image description pages before first section heading to Editor broken on file pages.Oct 23 2017, 2:25 PM
Jdlrobson renamed this task from Editor broken on file pages to Editor broken on non-main namespace pages..
Jdlrobson triaged this task as High priority.
Jdlrobson added a project: VisualEditor.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson updated the task description. (Show Details)
Jdlrobson renamed this task from Editor broken on non-main namespace pages. to Editor workflow confusing on file namespace pages..Oct 30 2017, 7:29 PM
Jdlrobson lowered the priority of this task from High to Medium.
Jdlrobson edited projects, added Web-Team-Backlog (Tracking); removed Web-Team-Backlog.
Jdlrobson updated the task description. (Show Details)

After investigating some more the editing of https://en.wikipedia.org/wiki/Template:Chem appears to work as expected since there are no sections on that page - just one block of documentation inside a div #template-documentation who's styles are provided on desktop only inside MediaWiki:Common.css

The file page behaviour appears to be by design since you cannot upload images on mobile. I'd suggest the editing team review the behaviour and see if it can be improved.

JTannerWMF added subscribers: matmarex, JTannerWMF.

@matmarex says he fixed this two years ago and can add more context

@matmarex says he fixed this two years ago and can add more context

I was thinking of rEMFR3615dd51f9f4: mobile.editor: Make edit link always open lead section (0), never first section. I'm not entirely sure whether that fixed this particular issue, but I can't reproduce the problem anymore, so it may have.

If you try these pages now, the edit link at the top will now edit the lead section, and the edit links next to each heading will edit the related section. This seems good to me.