Investigate missing page in specific "On this day" event
Closed, ResolvedPublic1 Story Points

Description

I noticed a missing page in "On this day" endpoint event for 2008 on June 26:
https://en.wikipedia.org/api/rest_v1/feed/onthisday/events/06/26

Just load the link above and search for "pages": []

However, if you look at the page https://en.wikipedia.org/wiki/June_26 that event *does* have one link.

Mhurd created this task.Jun 29 2017, 10:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bearND added a subscriber: bearND.Jul 12 2017, 2:39 AM

@Mhurd The issue is that isAnchorNotForYear() filters out the anchor ./2008_Karmah_Bombing because it's starting with the same number as the year of the event.

function isAnchorNotForYear(anchor) {
    return Math.abs(parseInt(anchor.title, 10)) !== Math.abs(year);
}
parseInt('2008_Karmah_Bombing', 10) = 2008

@bearND Oh nice! I'll take a peek at that...

NHarateh_WMF set the point value for this task to 1.Aug 8 2017, 7:19 PM
JMinor triaged this task as Low priority.Aug 14 2017, 8:04 PM
Mhurd added a comment.Aug 22 2017, 1:09 AM

@bearND your diagnosis was correct! Thanks again for the tip! The gerrit commit above fixes the issue and adds tests as well.

Change 372909 had a related patch set uploaded (by Mhurd; owner: Mhurd):
[mediawiki/services/mobileapps@master] Fix 'year page' identification bug.

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

Change 372909 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Fix 'year page' identification bug.

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

Restricted Application added a subscriber: jeblad. · View Herald TranscriptFri, Aug 25, 3:47 PM
ABorbaWMF added a subscriber: ABorbaWMF.

Tested on iPad Pro with iOS 10.3.3, iPhone 7+ with iOS 10.3.3, and iPhone 4 with iOS 9.3.5 on App 5.6.1 (1206)

I'm not sure I did it right, but... I was able to find/click the "2008" links on the page listed in the original description.

jeblad removed a subscriber: jeblad.Fri, Aug 25, 9:38 PM
JMinor closed this task as Resolved.Wed, Aug 30, 9:44 PM
JMinor added a subscriber: JMinor.

@ABorbaWMF you did it right ;)

Mentioned in SAL (#wikimedia-operations) [2017-09-06T22:06:32Z] <bsitzmann@tin> Started deploy [mobileapps/deploy@507a479]: Update mobileapps to 2cb6281 (T168848 T169277 T169274 T162179 T164033 T167921 T174698 T168848 T174808)

Mentioned in SAL (#wikimedia-operations) [2017-09-06T22:11:25Z] <bsitzmann@tin> Finished deploy [mobileapps/deploy@507a479]: Update mobileapps to 2cb6281 (T168848 T169277 T169274 T162179 T164033 T167921 T174698 T168848 T174808) (duration: 04m 53s)