[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

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?

Dvorapa created this task.Aug 31 2017, 8:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 31 2017, 8:43 PM
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.
Restricted Application added subscribers: Liuxinyu970226, Jay8g, TerraCodes. · View Herald TranscriptSep 1 2017, 7:06 AM
TheDJ added a subscriber: TheDJ.Sep 1 2017, 7:57 AM

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 added a subscriber: Jdlrobson.

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.

ovasileva closed this task as Resolved.Sep 1 2017, 3:24 PM

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.