Page MenuHomePhabricator

Investigate missing page in specific "On this day" event
Closed, ResolvedPublic1 Estimated 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.

Event Timeline

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

@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

ABorbaWMF subscribed.

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.

JMinor subscribed.

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