(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Page subscription button gets an event listener every time you preview, sends duplicate requests
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Enable "Show preview without reloading the page" in Preferences
  2. Open e.g. https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&action=edit&section=0
  3. Click "Show preview"
  4. Click "Subscribe" or "Unsubscribe" on the page toolbar (#p-cactions)

What happens?:
The notification "You have (un)subscribed" appears twice. The number of duplicate notifs increases as you repeat steps 3–4.

What should have happened instead?:
The notification appears once per (un)subscribing.

Other information (browser name/version, screenshots, etc.):

1.png (225×429 px, 5 KB)
2.png (123×527 px, 10 KB)
3.png (472×916 px, 24 KB)

Event Timeline

Further reproduction note: only applies in WikiEditor, because the preview mechanism is completely different in NWE.

Change 933135 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/DiscussionTools@master] Unregister existing topic subscription handlers on init

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

Change 933135 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Unregister existing topic subscription handlers on init

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

EAkinloose subscribed.

Notifications appear once per action triggered

Screenshot 2023-07-03 at 23.59.32.png (970×578 px, 111 KB)