Last modified: 2014-08-29 21:31:45 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.
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).
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.
*** Bug 66321 has been marked as a duplicate of this bug. ***
*** Bug 69907 has been marked as a duplicate of this bug. ***