Last modified: 2014-08-29 21:31:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65874, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63874 - Edit link loads the wrong section in some cases
Edit link loads the wrong section in some cases
Status: NEW
Product: Wikipedia App
Classification: Unclassified
Generic (Other open bugs)
Android (alpha)
All All
: Unprioritized minor
: ---
Assigned To: Nobody - You can work on this!
:
: 66321 69907 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-13 11:20 UTC by Sage Ross
Modified: 2014-08-29 21:31 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sage Ross 2014-04-13 11:20:17 UTC
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.
Comment 1 Monte Hurd 2014-04-30 18:15:36 UTC
So the api call which returns section data can have a "sectionprop" key called "fromtitle". If a section is transcluded it's my understanding that it came from a different article, and when this is the case the fromtitle tells you the name of the article it came from. 

Note: fromtitle's value is, inconsistently, sometimes false, sometimes, and weirdly, the name of the current article. In these two cases I think you can ignore. However, if the fromtitle is not false and not the name of the current article, then you have a true transclusion. 

So there's a futher complication - when we have a transclusion, the section index will no longer be numeric - it will be prefaced with "T-". Max says this "T-" preface needs to be preserved and passed along to whatever network task you're using to retrieve section data (in the case of transclusions only of course). I have switched my index value to a string to handle this.

Also note, in case you had been sorting sections by index, you'll want to switch to sorting by id (the "T-" preface messes up the sort I believe).
Comment 2 Dmitry Brant 2014-05-09 21:28:41 UTC
So, after some intense investigating, here are some of my findings:

- In the article linked above, the first section is built from a template (not transcluded from a different page per se), while the rest of the sections are not transcluded.

- The "fromtitle" key is "false" for the first section, and the name of the current article for the rest of the sections.

- The "index" key is an empty string for the first section, and continues with "1", "2", ... for the rest of the sections.

Does this point towards an issue with the API?

I can implement the ability to account for "T-" indexing for transcluded sections, but that won't fix the issue with this particular page.
Comment 3 Liangent 2014-06-09 19:25:29 UTC
*** Bug 66321 has been marked as a duplicate of this bug. ***
Comment 4 Dan Garry 2014-08-29 21:31:45 UTC
*** Bug 69907 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links