Page MenuHomePhabricator

Transcluded section edit links are broken in Minerva
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

I don't know whether this is new.
In desktop you can click edit at a section transcluded from another page. You will then edit the right section on the other page. This doesn't happen in mobile. It was reported at https://en.wikipedia.org/wiki/Talk:Main_Page#Cannot_edit_ITN_from_mobile?

Example:
https://en.wikipedia.org/wiki/Talk:Main_Page#Main_Page_error_reports transcludes https://en.wikipedia.org/wiki/Wikipedia:Main_Page/Errors which has the section "Errors in In the news". In desktop the section edit link at https://en.wikipedia.org/wiki/Talk:Main_Page#Errors_in_In_the_news correctly goes to https://en.wikipedia.org/w/index.php?title=Wikipedia:Main_Page/Errors&action=edit&section=T-4 which edits the section.

But in mobile at https://en.m.wikipedia.org/wiki/Talk:Main_Page the link goes to https://en.m.wikipedia.org/w/index.php?title=Talk:Main_Page&action=edit&section=T-4 or https://en.m.wikipedia.org/wiki/Talk:Main_Page#/editor/T-4 and does nothing.
On the transcluded page https://en.m.wikipedia.org/wiki/Wikipedia:Main_Page/Errors the link correctly goes to https://en.m.wikipedia.org/w/index.php?title=Wikipedia:Main_Page/Errors&action=edit&section=4 or https://en.m.wikipedia.org/wiki/Wikipedia:Main_Page/Errors#/editor/4 and works.

Tested in Firefox on a Windows computer and on an iPad with iOS.

acceptance criteria

Developer notes

I learned something new today.

{{Wikipedia:Transcluded_page}}

We'll need to update Skin::doEditSectionLink to use the $title passed as a parameter to the method rather than using "$this->getTitle()"
The JavaScript will also need to deal with this case. To keep things simple, we could not load the JavaScript editor and instead redirect to the page, however it would be useful to allow editing of that page with out leaving! We should discuss the trade offs in an estimation.

Event Timeline

I am the editor who posted the original report (first link in Description).
I note that since the *edit*-link does not react, one could consider & test whether just opening the page (i.e., read instead of edit opening) would be acceptable, skipping the bug.

Jdlrobson renamed this task from Transcluded section edit links are broken in mobile to Transcluded section edit links are broken in Minerva.Jun 27 2018, 8:55 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson edited projects, added MinervaNeue; removed MobileFrontend.
ovasileva triaged this task as Medium priority.Jun 29 2018, 11:42 AM
Vvjjkkii renamed this task from Transcluded section edit links are broken in Minerva to 0eaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
JJMC89 renamed this task from 0eaaaaaaaa to Transcluded section edit links are broken in Minerva.Jul 1 2018, 3:58 AM
JJMC89 lowered the priority of this task from High to Medium.
JJMC89 updated the task description. (Show Details)

We pointed this at a 5 but we're not quite sure what the client-side JavaScript changes will be needed.

Jdlrobson lowered the priority of this task from Medium to Low.Apr 9 2019, 4:32 PM
Jdlrobson subscribed.

This behaviour seems important so I defer to editing team on how and whether to fix this.

There's a bug in Minerva here as well, not only a bug in the editor. The section edit link is wrong. Compare:

Desktop (Vector):

<span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Transcluded_page&amp;action=edit&amp;section=T-1" title="Edit section: ">edit</a><span class="mw-editsection-bracket">]</span></span>

Mobile (Minerva):

<span class="mw-editsection"><a href="/w/index.php?title=Transcluded_page&amp;action=edit&amp;section=T-1" title="Edit section: " data-section="T-1" class="mw-ui-icon mw-ui-icon-element mw-ui-icon-minerva-edit-enabled edit-page mw-ui-icon-flush-right">Edit</a></span>

Note how on desktop it links to "Wikipedia:Transcluded_page", but on mobile it links to "Transcluded_page". It must link to the page where the actual source of that section is.

Talked with @ovasileva. We agreed this is not a priority for either of our teams. We'll keep both the Editing and Web team tags on the task in case either team wants to pick it up at some point in the future.

Change 582222 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/skins/MinervaNeue@master] SkinMinerva: Fix link target for transcluded pages in doEditSectionLink()

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

Change 582223 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@master] Allow section "numbers" like 'T-1' in the editors

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

Change 582222 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] SkinMinerva: Fix link target for transcluded pages in doEditSectionLink()

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

Change 582223 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Allow section "numbers" like 'T-1' in the editors

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

Thanks for fixing this @matmarex. Makes me really happy to know this is taken care of!

This comment was removed by Kipod.