Page MenuHomePhabricator

Investigate Metrolook ad placement
Open, HighPublic

Description


Ad placement on Metrolook seems to be problematic for some users - that being said in my Chrome it works fine. This should be checked out to see if there is an underlying issue.

cook879 created this task.Jun 15 2016, 11:19 AM
jack added a subscriber: jack.Jun 15 2016, 4:20 PM

This looks like it could've been a temporary glitch due to whatever JavaScript loading issues or somesuch on Google's end, or missing JS dependencies; more details, especially on reproducibility, would help. There's a possibility that this bug is one that manifests only on certain platforms (Windows, maybe just Windows 7) when using a certain version of Google Chrome.

From the screenshot I can see that it's Google Chrome on Windows 7 at 1366x768px. I tested this out on Chromium 50.0.2661.102 under Ubuntu 16.04 (64-bit) at 1280x800px (as well as in the developer tools' "responsive design" mode to emulate mobile environments where the screen resolution is smaller). The wide skyscraper ad is only shown for screens which are at least 1300 pixels wide (as per /extensions/ShoutWikiAds/css/metrolook-wide-skyscraper-ad.less). The related div#content rule in that file might be related, though I'm not so sure; in my tests, the leaderboard ad was never misplaced the way it is in this screenshot.

Ads are looking weird on Mobile Chrome too. Samsung Galaxy A3, Android 5.0.2, Mobile Chrome 51. Can anyone check ads with other browsers?

Sidebar isn't working, after a couple of refreshes here and there - Using Windows 10, Chrome v51.0.2704.84, 1366 x 768

MtMNC added a subscriber: MtMNC.Jun 15 2016, 9:08 PM

Oddly enough, I've gotten several different ad placements, including the correct one. This is on Chrome 51.0.2704.84 on OS X 10.11.4 (El Capitan). Here are some examples:

jack added a comment.Jun 16 2016, 4:51 PM

So something somewhere is calling document.write, which isn't really supported in MediaWiki anymore and that's breaking things. This results in a warning logged into the browser's JS console: "Use of 'write' is deprecated. Use jQuery or mw.loader.load instead.". This traces back to the file /resources/src/mediawiki.legacy/wikibits.js.
I was able to reproduce the broken ad behavior in Opera 37.0.2178.32 under Windows 7.

Now the next step is to figure out what might be calling document.write and replace that with something better. A potential culprit is the DismissableSiteNotice extension, although I don't know why that'd be breaking only one skin instead of most/all skins. (There's an upstream ticket for that on Wikimedia's Phabricator, FWIW.)

lewiscawte triaged this task as High priority.Nov 11 2016, 1:03 PM
lewiscawte assigned this task to jack.Nov 14 2016, 9:41 PM