Page MenuHomePhabricator

On mobile, navboxes' JS edit links point to non-existent section #1
Closed, DeclinedPublic

Description

If a page contains only a navbox (e.g. https://hu.m.wikipedia.org/wiki/Sablon:Újpest_FC_keret?oldid=18792549 and https://hu.m.wikipedia.org/wiki/Sablon:A-League_-_Az_év_fiatal_labdarúgója?oldid=18849048), its lead edit link points to section 1 (instead of section 0), which, of course, doesn't exist. If it contains a documentation too (https://hu.m.wikipedia.org/wiki/Sablon:2016–2017-es_AS_Roma_keret?oldid=18790631), the link is OK. The pure HTML links work in both cases.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 20 2017, 7:31 PM
Tacsipacsi updated the task description. (Show Details)Jun 20 2017, 7:32 PM
Tacsipacsi added a project: MobileFrontend.
Framawiki renamed this task from Navboxes' JS edit links point to non-existent section 1 to On mobile, navboxes' JS edit links point to non-existent section #1.Jun 20 2017, 7:33 PM
Jdlrobson added a subscriber: Jdlrobson.

Me to check if this relates to Editing/section collapsing edge cases (https://phabricator.wikimedia.org/T166005)

Jdlrobson closed this task as Declined.Jun 21 2017, 7:23 PM

This is behaving as expected.
See https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/skins.minerva.editor/init.js#L256

The idea is to allow you to add new content below the existing content.

Given this is a template namespace it would make sense to not scrub the .navbox element from non-main namespaces. I've created T168567 to fix that.

Tacsipacsi reopened this task as Open.Jun 21 2017, 9:22 PM

Linking to a non-existent section may allow adding new content below the existing, but new content can be added also by just editing the existing lead section, and lead should be editable even if it has no visible content. (An article lead can consist of merely an ambox saying there is no lead text, in which case we make the user impossible to add the lead text.)

Jdlrobson closed this task as Declined.Jun 21 2017, 10:38 PM

As stated, the current behaviour is by design. Feel free to open a more generic bug that doesn't mention navboxes (as this has nothing to do with them) about changing that behaviour. Please link to the original bug (https://static-bugzilla.wikimedia.org/bug49215.html) in that new task and tag VisualEditor since that team is responsible for the decision.