Page MenuHomePhabricator

Edit link loads the wrong section in some cases (for Mobileview API)
Closed, ResolvedPublic1 Estimated Story Points

Description

I was trying to edit this page with the app: https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2014-04-09/Special_report

I found that all the edit links except the first one load a different section than the heading they appear next to. (Maybe it's because of the template that includes NOEDITSECTION ?)

On other articles, this isn't a problem, so it seems to be something about how the Signpost page is set up.


Version: Android (alpha)
Severity: minor

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
  • Bug 69907 has been marked as a duplicate of this bug. ***
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 11 2015, 5:14 PM
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 4 2015, 8:28 PM
Etonkovidova added a subscriber: Etonkovidova.EditedDec 5 2015, 2:39 AM

Checked with 5.0.0.534 on iPad iOS 9.1 - no more issues with edit links leading to a wrong sections.

Note:
However the article's first template
{{Wikipedia:Signpost/Template:Signpost-header|||}}
"triggers" the Edit (pencil) icon to be displayed on apps (Android app too).

It is not the case on wiki - the template is displayed without [edit] section.

The same case is T96922: 5.0.0.534 the editing icon(the pencil icon) is displayed twice. In the articlehttps://en.wikipedia.org/wiki/List_of_minor_planets:_13001%E2%80%9314000, the first template {{TOC001|prefix=13}} will cause the edit icon to be displayed unnecessarily. Again, the wiki does not display such duplicate(or false) edit icons.

JMinor closed this task as Resolved.Dec 15 2015, 11:14 PM
JMinor claimed this task.
JMinor added a subscriber: JMinor.

Okay T96922 is still open, so I'll resolve this and we can address the template issue on that card.

Florian reopened this task as Open.Feb 7 2016, 4:52 PM
Florian removed JMinor as the assignee of this task.

Reopen because this happens again for the beta of the Android app (iOS people: I have no iOS device, so feel free to test and remove the project if it doesn't happen for you :)), originally reported by https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=8969524#.

The example page is https://en.wikipedia.org/wiki/Barry_Marshall. If you open it in the stable version and click the edit link near the "Life and research" section, you'll correctly get the "Life and research" section in the editing window. If you do the same in the beta app release you'll get the "Education and early life" section (the one before). You can reproduce this with other sections in this article, too, you'll get the section before the one you want to edit.

JMinor triaged this task as Low priority.Feb 11 2016, 10:36 PM

Reopen because this happens again for the beta of the Android app (iOS people: I have no iOS device, so feel free to test and remove the project if it doesn't happen for you :)), originally reported by https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=8969524#.

The example page is https://en.wikipedia.org/wiki/Barry_Marshall. If you open it in the stable version and click the edit link near the "Life and research" section, you'll correctly get the "Life and research" section in the editing window. If you do the same in the beta app release you'll get the "Education and early life" section (the one before). You can reproduce this with other sections in this article, too, you'll get the section before the one you want to edit.

I get the correct section in the iOS build 686, fyi.

@Dbrant should we have a separate Android ticket for this? It is being pushed through iOS's workflow, and if it's "resolved" for iOS then it will disappear from the Android board, regardless of Android resolution.

I'd like to know how this will actually be solved, without modifying the mobileview backend. AFAIK, the reason for this behavior is when a template expands into an actual wikitext section, and confuses mobileview as to the number of sections in the article. So, when you click on an edit link for section n, it will load the wikitext for section n-1.

For the record, the [[Barry Marshall]] article is working correctly in stable and beta.

Have you tried reproducing this issue with the original Signpost article mentioned in the task description? (It should still exhibit the incorrect behavior).

@Fjalapeno just mentioning you because you moved it to QA. Do you know the answers to the @Dbrant comment above?

ori added a subscriber: ori.Mar 7 2016, 7:17 PM

Related to T124356?

Niedzielski raised the priority of this task from Low to High.Mar 7 2016, 7:38 PM
Niedzielski added a subscriber: Niedzielski.

This appears to be a MCS only issue. Moving to high priority since this will effect production after rollout.

Mholloway added a comment.EditedMar 7 2016, 7:38 PM

For the instances beginning last month, this looks like a mobile content service vs. MW API issue. Just confirmed that the Barry Marshall bug exists in the Beta app (now 100% on content service) but not the production app (100% MediaWiki API).

The inconsistency last month was probably an artifact of the gradual rollout in beta.

Change 275702 had a related patch set uploaded (by Mholloway):
Fix bug in lead paragraph shifting leading to incorrect section output

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

Mholloway moved this task from Incoming to Code Review on the Mobile-Content-Service board.

Change 278087 had a related patch set uploaded (by Mholloway):
Restore lead paragraph shifting to work with section divs

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

Change 275702 abandoned by Mholloway:
Fix bug in lead paragraph shifting leading to incorrect section output

Reason:
The new joint is at https://gerrit.wikimedia.org/r/#/c/278087/

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

Change 278087 merged by jenkins-bot:
Restore lead paragraph shifting to work with section divs

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

Pulling this in for QA.

QA note: This task was originally opened with a different cause, so you can safely ignore all comments prior to https://phabricator.wikimedia.org/T65874#2006374.

Not fixed in the 2.1.143-alpha-2016-03-18 build. Still waiting for the next build and I will test this again.

Sorry, I keep pulling this in for QA before it's deployed. ETA Wednesday. Will update as appropriate.

@Nicholas.tsg This is now deployed and ready for testing. Thanks for your patience!

Barry Marshall page is working correctly in Android with 2.1.143-alpha-2016-03-22 build. Cannot reach the 16 March 2016 page in the Signpost Archives to test there - the most recent Signpost page I can access is 2016-02-17.

This issue is still present when using the mobileview API (not using Content Service), and will therefore still be present in iOS. I'm splitting off this task to reflect that it's done in the Content Service, but this original task should remain open until it's handled for the mobileview case.

Dbrant renamed this task from Edit link loads the wrong section in some cases to Edit link loads the wrong section in some cases (for Mobileview API).Mar 25 2016, 2:07 PM

@Dbrant For what articles are you seeing problems when loading with MWAPI? For all the articles I tested, the problem appeared in the content service only.

@Mholloway The Signpost article as stated in the task description. And more generally, any article that uses a template that expands into a Section, for example [[Portal:Communism]].

This issue is well-understood to be a limitation of mobileview, and there's no clear fix for it yet.

@Dbrant Ah, thanks. I trained myself too well to ignore the original report.

Mholloway lowered the priority of this task from High to Medium.Apr 5 2016, 5:38 PM

@Mholloway: An explanation, why you lowered the priority is always appreciated (also for other priority changes). That makes the whole process more transparent :)

Mholloway added a comment.EditedApr 11 2016, 1:50 PM

Floiran, that's a good point, I'll make a point of leaving more commentary around these kinds of changes.

In this instance, @Niedzielski had changed the priority of this task from low to high due to the second issue reported here, which directly implicated the mobile content service we're in the process of rolling out to the stable app. Since that issue is resolved, I dropped the status again (though to normal, rather than low, since I think the original issue is a relatively serious one, even if as @Dbrant points out there's no clear fix).

MBinder_WMF set the point value for this task to 1.May 18 2016, 7:51 PM
Mholloway removed Mholloway as the assignee of this task.Jun 15 2016, 10:15 PM

Reported again on the German Wikipedia (for the Android app); I verified this in the case of https://de.wikipedia.org/wiki/Wikipedia:Fragen_zur_Wikipedia (village pump page with a complex template on top).

Josve05a removed a subscriber: Josve05a.Sep 3 2017, 11:11 AM

Testing on Samsung Galaxy Express 3 SM-J120A (Android 6.0.1) and Wikipedia app 2.7.239-alpha-2018-08-20. Since there weren't steps to recreate and an expected vs. actual result, I took screencaps from my device. As shown, the edit pencil opened, and I got a few screens in, but I was given an error when trying to publish changes (changes weren't saved).

Dbrant closed this task as Resolved.May 1 2020, 2:21 PM
Dbrant claimed this task.

MobileView is no longer used. (in Beta; will soon be in prod.)