Page MenuHomePhabricator

CentralNotice banners not showing in Minerva
Closed, ResolvedPublic

Description

Steps to reproduce

Expected result

  • The banner is displayed regardless of any CentralNotice campaign settings.

Actual result

  • No banner is displayed.

Remarks

  • This is severely affecting the fundraising campaign (at the least the one ran by WMDE).
  • It doesn't seem to be an issue with any banner. This is happening with all banners when using the Minerva skin.
  • The network tab in the web developer tools shows a successful request to Special:BannerLoader, but the response is not injected into the page.

Event Timeline

kai.nissen renamed this task from Banners not showing in Minerva to CentralNotice banners not showing in Minerva.Nov 19 2021, 11:52 AM
kai.nissen raised the priority of this task from High to Unbreak Now!.
kai.nissen updated the task description. (Show Details)
Ladsgroup subscribed.

Can't say for sure but given that CentralNotice doesn't follow the train, it can be caused by mismatch between the code of minerva/core and CN and not being backward compatible.

It looks like this change is the culprit https://github.com/wikimedia/mediawiki-skins-MinervaNeue/commit/7530f1c14571ef1719d22ca6a80883035dce61fd#diff-3b487d87a7042d7284beb9033bd170a3126814e723623f2dc9b7167a627b7b32L682

CentralNotice injects the banners into this element after page load:

$( function () {
	$( '#siteNotice' ).prepend( '<div id="centralNotice"></div>' );
} );

The sites were rolled back for the unrelated T296098 so banners are working again for now.

Adding @cjming and @Jdlrobson who worked on the change above (gerrit link), it definitely looks like the cause.

Change 740213 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/MinervaNeue@master] Fix banners to show CentralNotice

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

Change 740213 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fix banners to show CentralNotice

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

Change 740246 had a related patch set uploaded (by Nray; author: Clare Ming):

[mediawiki/skins/MinervaNeue@wmf/1.38.0-wmf.9] Fix banners to show CentralNotice

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

cjming changed the task status from Open to In Progress.Nov 19 2021, 7:34 PM

sorry about that!

scheduled for backport Monday 11/22

The train is blocked on this task and another one that is a memory leak of some sort ( T296098 ). To debug that second issue, we need to deploy the code to production for debugging which we can only do once this CentralNotice bug has been backported. It is scheduled at 19:00 UTC (thanks @cjming), I am willing to backport it earlier today but would need a confirmation as to how I can reproduce and confirm the backport work.

@kai.nissen @Pcoombe @AbbanWMDE my understand is that https://en.m.wikipedia.org/?banner=wmua_wikiscience_2021 was not showing the banner (it does now since we have rolled back MediaWiki). On the new MediaWiki we don't see the banner https://m.mediawiki.org/?banner=wmua_wikiscience_2021 since it is running 1.38.0-wmf.9.

If I backport the code and roll it on the mwdebug hosts, I should see the banner on mediawiki.org which would confirm the fix works and this task can thus be resolved?

I am willing to port it during today UTC morning backport window at 12:00 - 13:00 UTC (one hour from now).

@hashar Yes, if you see a banner when adding banner=wmua_wikiscience_2021 (or any banner) to the URL, the task is resolved.

This comment was removed by Ladsgroup.

Ignore the above comment ^ I missed an "if"

Thanks! I will deploy the backport config patch during the morning backport window. I will do the patch after the others have been completed.

Change 740246 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@wmf/1.38.0-wmf.9] Fix banners to show CentralNotice

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

Mentioned in SAL (#wikimedia-operations) [2021-11-22T12:11:25Z] <hashar@deploy1002> Synchronized php-1.38.0-wmf.9/skins/MinervaNeue: Fix banners to show CentralNotice - T296077 (duration: 01m 04s)

I have pulled the patch on mwdebug1001 and confirmed https://m.mediawiki.org/?banner=wmua_wikiscience_2021 had the banner. Solved!

@cjming sorry for the overnight deployment hijacking!