Page MenuHomePhabricator

BannerHistoryLogger issue prevents users reaching payments wiki
Closed, ResolvedPublic2 Estimated Story Points

Description

During the 1-hour en6C banner test on 2019-07-12, donors were not correctly sent to Payments when they clicked to donate. It seems this was due to an issue with the Banner History Logger never resolving the promise returned by mw.centralNotice.bannerHistoryLogger.ensureLogSent().


Initially, the issue seemed to be a bit different. Here is the previous name and description (in case the issue as originally described shows up again):

bannerHistoryLogger not present when banner history mixin enabled

If the banner history mixin is enabled for a CentralNotice campaign:

  • mw.centralNotice.getDataProperty( 'mixins' ).bannerHistoryLogger is true as expected
  • but mw.centralNotice.bannerHistoryLogger doesn't actually exist
  • since fundraising banners try to use bannerHistoryLogger.ensureLogSent() before submitting to payments, this blocks donors from reaching the payments form.

The last fundraising banners ran in May, so this likely broke since then.

We can probably live without the banner history data for our current tests, and disable the mixin for now. But it should be fixed as this is useful data.

Event Timeline

Hi! I'm getting a different result here...

Looking at the banners via the test campaign on aa.wikibooks...

Indeed, clicking to donate does nothing. However, I am seeing mw.centralNotice.bannerHistoryLogger there as it should be when I look in the console.

Rather, what seems to be happening, at least in my browser (FF 66) is that the promise returned by ensureLogSent() is never resolving. The code that navigates to payments (by setting window.location.href) is in the always() function of that promise. So, that never executes. (See the last bit of frb.submitForm() in CoreJS-2018.js.)

In the console:

> p = mw.centralNotice.bannerHistoryLogger.ensureLogSent();
> p.state()
 "pending"

This is indeed a problem that would not show up when viewing a banner using the on-wiki preview, but that does happen when the banner is shown as part of a campaign. (Here's a task for some improvements in CN that would help avoid this: T227732.)

Following the breadcrumbs, it seems the issue is that [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CentralNotice/+/master/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js#389 | readyToLogDeferredObj ]] in turn does not resolve, because the promise from [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CentralNotice/+/master/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js#316 | mw.loader.using() ]] is rejected. Seems like it's due to a change in or related to EventLogging that prevents loading the schema the way we do. In the console:

> mw.loader.using( [ 'schema.' + 'CentralNoticeBannerHistory' ] ).state();
 "rejected"

In any case, as a quick band-aid, turning off banner history should make things work.

Thanks!!!

Change 523853 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Banner history logger: remove loading of schema module

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

I've reproduced the issues I found related this bug both locally on the Beta Cluster, and have a fix that makes it work locally. That is, the patch causes the promise returned by mw.centralNotice.bannerHistoryLogger.ensureLogSent() to resolve properly.

Here is the Beta Cluster test campaign for this.

@Pcoombe can you check if you're still seeing a problem you described in the task, that is, the absence of mw.centralNotice.bannerHistoryLogger, either on the Beta Cluster or via an aa.wikibooks test campaign on production? Maybe that was a different issue?

No, I can see mw.centralNotice.bannerHistoryLogger on both beta cluster and production now.

No, I can see mw.centralNotice.bannerHistoryLogger on both beta cluster and production now.

Ah ok thanks... Should I update the task name and description?

The fact that you couldn't see it before might be another issue... Maybe we should just keep an eye out for it happening again, I guess?

Another unkown for me here is why, even with this problem, some donations did come through. I guess they could have been from people who had Do Not Track enabled, though I don't know if that's enough people to account from for the donations we did receive...

No, I can see mw.centralNotice.bannerHistoryLogger on both beta cluster and production now.

Ah ok thanks... Should I update the task name and description?

Yes please

The fact that you couldn't see it before might be another issue... Maybe we should just keep an eye out for it happening again, I guess?

Another unkown for me here is why, even with this problem, some donations did come through. I guess they could have been from people who had Do Not Track enabled, though I don't know if that's enough people to account from for the donations we did receive...

Yes that puzzled me as well. Something browser dependent maybe?

Ah ok thanks... Should I update the task name and description?

Yes please

K will do! Thanks :)

The fact that you couldn't see it before might be another issue... Maybe we should just keep an eye out for it happening again, I guess?

Another unkown for me here is why, even with this problem, some donations did come through. I guess they could have been from people who had Do Not Track enabled, though I don't know if that's enough people to account from for the donations we did receive...

Yes that puzzled me as well. Something browser dependent maybe?

The only codepath I see right now where they would have made it through to Payments is when they have Do Not Track enabled... however I may be missing something!

AndyRussG renamed this task from bannerHistoryLogger not present when banner history mixin enabled to BannerHistoryLogger issue prevents users reaching payments wiki.Jul 18 2019, 4:22 AM
AndyRussG updated the task description. (Show Details)
AndyRussG set the point value for this task to 2.
AndyRussG updated the task description. (Show Details)

Change 523853 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Banner history logger: remove loading of schema module

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

Change 525677 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf_deploy] Banner history logger: remove loading of schema module

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

Change 525677 abandoned by AndyRussG:
Banner history logger: remove loading of schema module

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

Change 525677 restored by AndyRussG:
Banner history logger: remove loading of schema module

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

Change 525677 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf_deploy] Banner history logger: remove loading of schema module

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

Change 526563 had a related patch set uploaded (by Catrope; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf/1.34.0-wmf.16] Banner history logger: remove loading of schema module

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

Change 526567 had a related patch set uploaded (by Catrope; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf/1.34.0-wmf.15] Banner history logger: remove loading of schema module

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

Change 526567 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf/1.34.0-wmf.15] Banner history logger: remove loading of schema module

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

Change 526563 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf/1.34.0-wmf.16] Banner history logger: remove loading of schema module

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

Mentioned in SAL (#wikimedia-operations) [2019-07-31T00:01:08Z] <catrope@deploy1001> Synchronized php-1.34.0-wmf.16/extensions/CentralNotice/: T227711 among others (duration: 00m 48s)

Mentioned in SAL (#wikimedia-operations) [2019-07-31T00:04:48Z] <catrope@deploy1001> Synchronized php-1.34.0-wmf.15/extensions/CentralNotice/: T227711 among others (duration: 00m 47s)

Tested a campaign on aa.wikipedia.org with banner history logger enabled, and this looks good now. Thanks @AndyRussG !