Page MenuHomePhabricator

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

Assigned To
Authored By
Ragesoss
Apr 13 2014, 11:20 AM
Referenced Files
F25203390: T65874 Part 2.png
Aug 21 2018, 5:38 PM
F25203393: T65874 Part 4.png
Aug 21 2018, 5:38 PM
F25203392: T65874 Part 5.png
Aug 21 2018, 5:38 PM
F25203394: T65874 Part 3.png
Aug 21 2018, 5:38 PM
F25203389: T65874 Part 1.png
Aug 21 2018, 5:38 PM
F25203388: T65874 Part 6.png
Aug 21 2018, 5:38 PM
F25203391: T65874 Part 7.png
Aug 21 2018, 5:38 PM

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. ***

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 claimed this task.
JMinor subscribed.

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

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.

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?

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

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

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

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 :)

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

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).

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).

T65874 Part 1.png (800×480 px, 63 KB)
T65874 Part 2.png (480×800 px, 43 KB)
T65874 Part 3.png (480×800 px, 68 KB)
T65874 Part 4.png (480×800 px, 74 KB)
T65874 Part 5.png (800×480 px, 73 KB)
T65874 Part 6.png (800×480 px, 16 KB)
T65874 Part 7.png (800×480 px, 80 KB)

Dbrant claimed this task.

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