Page MenuHomePhabricator

Skin should show "Watch" (not "Unwatch") tab on action=unwatch response
Open, LowPublic

Description

If one tries to unwatch a page *not* via the AJAX star, but by direct link to e.g. /w/index.php?title=Foo&action=unwatch (and submit the confirmation form), that POST response has at the top of it a solid blue star. A refresh corrects the error.

Details

Reference
bz26292
Related Gerrit Patches:

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:19 PM
bzimport added a project: MediaWiki-Interface.
bzimport set Reference to bz26292.
bzimport added a subscriber: Unknown Object (MLST).
Jarry1250 created this task.Dec 9 2010, 9:00 PM
  • Bug 32627 has been marked as a duplicate of this bug. ***

Created attachment 10617
bug: the star should be blue after watching the page

I confirm this following these steps:

  1. [[User:Js/watchlist.js]] was not in my watchlist
  2. I went to

https://en.wikipedia.org/w/index.php?title=User:Js/watchlist.js&action=watch

  1. I answered [yes] to the question "Add this page to your watchlist?"
  2. The page was reloaded, and there was a message "The page "User:Js/watchlist.js" has been added to your watchlist...", but the star was still white (see screenshot)
  3. Reloading the page (by clicking in the "User page" link) fixed the star color.

Attached:

Still happening on mw.org...

sumanah wrote:

I can no longer reproduce this bug, so I think that in the last 7 months something else must have fixed it. :-) Thanks for the report!

I'm still able to reproduce it following the steps from comment 3.

Qgil added a comment.Apr 2 2013, 5:45 PM

Yes, still can be reproduced.

  • Bug 62458 has been marked as a duplicate of this bug. ***

Seriously? This bug has been open for this long?! o_O
I'm guessing race condition... does skin render before the watch actually takes place?

I can reproduce this bug on enwiki by the steps from comment 3. But I cannot reproduce this bug on a local wiki.

I also can't replicate this at the moment.. I'm not sure what changed if anything since the 9th...

(I can still replicate this on enwiki and mediawiki.org though)

I still can reproduce this bug on enwiki by the steps from comment 3. But I cannot reproduce this bug on a local wiki.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2015, 3:46 PM

[..] does skin render before the watch actually takes place?

Unlikely.. My guess is slave lag as it's happening on WMF wikis but never able to reproduce locally.

aaron added a subscriber: aaron.Oct 29 2015, 6:53 PM

Since that action doesn't redirect, then the isWatched() call probably happens before the update is commit, each being read from different servers. It would need to force the new value via some method, or redirect, or have isWatched() check hasOrMadeRecentMasterChanges().

Krinkle renamed this task from ?action=unwatch page still shows solid blue ("Remove this page...") star to Skin shouldn't show "Unwatch" tab in action=unwatch response.Nov 3 2015, 7:19 AM
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.
Krinkle removed a subscriber: wikibugs-l-list.

I still can reproduce this bug on enwiki by the steps from comment T28292#306400.

Can a change like https://gerrit.wikimedia.org/r/#/c/263673/2/includes/AjaxDispatcher.php fix this problem?

I still can reproduce this bug on enwiki by the steps from comment T28292#306400.
Can a change like https://gerrit.wikimedia.org/r/#/c/263673/2/includes/AjaxDispatcher.php fix this problem?

The change is not related.

I can not reproduce this bug on enwiki by the steps from comment T28292#306400. Which change fixed this bug?

I'm pretty sure this bug is still there. loadWatchedItem() does not check for recent writes. It might be more or less common at times though.

Krinkle renamed this task from Skin shouldn't show "Unwatch" tab in action=unwatch response to Skin should show "Watch" (not "Unwatch") tab on action=unwatch response.Nov 1 2016, 11:43 PM

Change 319255 had a related patch set uploaded (by Krinkle):
WatchedItemStore: Update process cache when adding items

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

Change 319255 merged by jenkins-bot:
WatchedItemStore: Update process cache when adding items

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

Change 319255 merged by jenkins-bot:
WatchedItemStore: Update process cache when adding items
https://gerrit.wikimedia.org/r/319255

This patch helps ensure that after adding a page to the watchlist, the confirmation page will show "Unwatch" instead of "Watch".

However, the reverse use case (removing a page from the watchlist) is not yet covered because WatchedItemStore only caches presence of values, not absence.

Krinkle removed a subscriber: Krinkle.
Qgil removed a subscriber: Qgil.Nov 17 2016, 6:54 AM