Page MenuHomePhabricator

[Regression] Clicking settings cog as anonymous user doesn't do anything
Closed, ResolvedPublic

Description

Observed on cawiki and hewiki....
As an anonymous user, when I click on the settings cog nothing happens.
Expected: the settings dialog opens.

In JS console:

Uncaught TypeError: Cannot read property 'preventDefault' of undefined
    at Object.showSettings (eval at <anonymous> (load.php?debug=false&lang=he&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:1), <anonymous>:368:964)
    at HTMLAnchorElement.eval (eval at <anonymous> (load.php?debug=false&lang=he&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:1), <anonymous>:380:816)
    at HTMLAnchorElement.dispatch (load.php?debug=false&lang=he&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:65)
    at HTMLAnchorElement.elemData.handle (load.php?debug=false&lang=he&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1ljmhq7:60)

Details

Related Gerrit Patches:
mediawiki/extensions/Popups : wmf/1.29.0-wmf.19renderer: Pass event to behavior for processing
mediawiki/extensions/Popups : masterrenderer: Pass event to behavior for processing

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 5 2017, 11:36 PM
Jdlrobson triaged this task as High priority.Apr 5 2017, 11:37 PM
Jdlrobson added a subscriber: ovasileva.

@ovasileva this may qualify as an unbreak now as I suspect the bug will be on all wikis tomorrow. I can swat a fix tomorrow if we can work out the root cause...

Looks like this was introduced by rEPOP29963edb09c5: preview: Add click behavior and should be easy to fix.

Change 346668 had a related patch set uploaded (by Jdlrobson):
[mediawiki/extensions/Popups@master] Pass event to showSettings

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

@phuedx / @Jhernandez would you mind reviewing the above patch and possibly SWAT deploying the fix during the European hours before the bug hits production? Thanks!

phuedx added a comment.EditedApr 6 2017, 8:54 AM

I assume this is about Page-Previews.

You assume correctly (read: Thanks, @Aklapper!).

phuedx added a comment.Apr 6 2017, 9:53 AM

FTR I've reverted @bmansurov's PS. While I do agree with @bmansurov's, it'd introduce another regression: the click event handler would also be triggered when clicking the settings cog.

It's clear that the ext.Popups.PreviewBehavior abstraction is leaky and needs either a little more work or to be brought closer to/merged into the renderer but that's out of scope of this task.

Change 346720 had a related patch set uploaded (by Phuedx; owner: Jdlrobson):
[mediawiki/extensions/Popups@wmf/1.29.0-wmf.19] renderer: Pass event to behavior for processing

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

Change 346668 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] renderer: Pass event to behavior for processing

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

Jhernandez assigned this task to phuedx.Apr 6 2017, 10:15 AM
Jhernandez moved this task from Needs Analysis to Needs More Work on the Reading-Web-Sprint-95 board.

Assigning to @phuedx for the swat. I've qad and merged the patch and qad and +1d the swat cherry pick.

Change 346720 merged by jenkins-bot:
[mediawiki/extensions/Popups@wmf/1.29.0-wmf.19] renderer: Pass event to behavior for processing

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

Mentioned in SAL (#wikimedia-operations) [2017-04-06T13:20:51Z] <hashar@tin> Synchronized php-1.29.0-wmf.19/extensions/Popups: renderer: Pass event to behavior for processing - T162324 (duration: 00m 51s)

I've tested both the logged in and out flows and they both work as expected.

phuedx renamed this task from Clicking settings cog as anonymous user doesn't do anything to [Regression] Clicking settings cog as anonymous user doesn't do anything.Apr 6 2017, 1:34 PM
phuedx raised the priority of this task from High to Unbreak Now!.
phuedx moved this task from Incoming to 2016-17 Q3 on the Readers-Web-Backlog board.
phuedx added a project: Regression.
Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptApr 6 2017, 1:35 PM
phuedx added a comment.Apr 6 2017, 1:36 PM

@ovasileva this may qualify as an unbreak now as I suspect the bug will be on all wikis tomorrow. I can swat a fix tomorrow if we can work out the root cause...

You're right. This is/was definitely a regression.

Jhernandez reassigned this task from phuedx to ovasileva.Apr 6 2017, 1:36 PM

I've tested in ca.wikipedia.org and it seems fixed.

Off to @ovasileva for signoff

ovasileva closed this task as Resolved.Apr 6 2017, 2:20 PM

tested on hewiki and cawiki - looks good.

Good team work all!