Page MenuHomePhabricator

[Regression] Page previews stopped working on wikis where jQuery 3 is not available
Closed, ResolvedPublic

Description

Webconsole:

Uncaught TypeError: e.getPageSummary(...).then(...).catch is not a function

Missing from:
https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-betafeatures

Screenshot at 2017-09-01 00-03-34.png (1×1 px, 544 KB)

IRC report:

<CyanXerus82> Hello, the new preview features are not working for me. This started yesterday on the Catalan wikipedia but the other language it was still working, now tonight none are working. I've checked settings in preferences, I've cleared my caches and cookies, I've restarted computer. Is this feature temporarily unavailable?

Event Timeline

Vachovec1 renamed this task from Page previews stopped working on Czech Wikipedia to [Regression] Page previews stopped working on Czech Wikipedia.Aug 31 2017, 9:07 PM
Vachovec1 added a project: Regression.

Tested in Firefox and Chrome. Both the same - no page previews at all. Definitely a regression from today's MediaWiki rollout, because it's still working in two Firefox panels, which I have still opened (without touching the content) since (European) afternoon. Not one functional Page Preview in newly opened/actualized panels.

Quiddity renamed this task from [Regression] Page previews stopped working on Czech Wikipedia to [Regression] Page previews stopped working.Sep 1 2017, 7:06 AM
Quiddity triaged this task as Unbreak Now! priority.
Quiddity updated the task description. (Show Details)
Quiddity added subscribers: Quiddity, phuedx, ovasileva.

It's using jQuery 3 specific catch on deferred, but that isn't available on all wikis yet pending T124742: Upgrade to jQuery 3.

This might also influence T172291: Launch page previews A/B test on enwiki and dewiki.

Confirming that Page previews are working for me on wikis where jQuery3 is enabled (tested on nl.wiki, pl.wiki). They are not working on wikis without jQuery3 (tested on it.wiki, es.wiki, fr.wiki).

This seems to have been introduced here https://gerrit.wikimedia.org/r/#/c/373327/ where I upgraded a promise usage to the jQuery 3 version, as @TheDJ mentions. I incorrectly understood that it was available already and migrated the code. As specified in T124742: Upgrade to jQuery 3 we are just starting to roll it out, so the code should be using the old promise behavior that works on v2 and v3 until rollout is complete.

I'll create a patch to fix it now.

Change 375357 had a related patch set uploaded (by Jhernandez; owner: Jhernandez):
[mediawiki/extensions/Popups@master] Revert usage of Promise A in actions.js#fetch

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

Change 375360 had a related patch set uploaded (by Jhernandez; owner: Jhernandez):
[mediawiki/extensions/Popups@wmf/1.30.0-wmf.16] Revert usage of Promise A in actions.js#fetch

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

Jdlrobson renamed this task from [Regression] Page previews stopped working to [Regression] Page previews stopped working on wikis where jQuery 3 is not available.Sep 1 2017, 11:46 AM

Change 375357 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Revert usage of Promise A in actions.js#fetch

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

Change 375360 merged by jenkins-bot:
[mediawiki/extensions/Popups@wmf/1.30.0-wmf.16] Revert usage of Promise A in actions.js#fetch

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

Mentioned in SAL (#wikimedia-operations) [2017-09-01T15:00:58Z] <reedy@tin> Synchronized php-1.30.0-wmf.16/extensions/Popups/: T174724 (duration: 00m 46s)

Jdlrobson subscribed.

Fixed in production now.

For future reference, I've documented what to do in this kind of situation here:
https://www.mediawiki.org/wiki/Reading/Web/What_to_do_with_an_UBN

Jdlrobson lowered the priority of this task from Unbreak Now! to High.Sep 1 2017, 3:08 PM

Excellent, just verified on https://ca.wikipedia.org/wiki/Portada, all working well!

Off to @ovasileva to re-check and close the task.

Ok, testing through workflow on eswiki:

Logged-in:

  • previews appearing when user preference set to enable
  • previews not appearing when preference is disabled

Anon:

  • previews appear

plwiki: previews appearing

enwiki: previews not appearing as anon, previews appearing in user preferences
dewiki: same as enwiki

looks good! Thanks all for saving the day.