Page MenuHomePhabricator

Adding a caption add file unintentionally to watchlist
Closed, ResolvedPublic

Description

Adding a caption add file unintentionally to watchlist

Steps to reproduce:

  1. Enable, if not already done, the option "Add pages I create and files I upload to my watchlist" in your preferences (watchlist section)
  2. Load a file without captions
  3. Add a caption in a language of your choice
  4. Result: File was added to your watchlist even that you have not created the file/file page

Expected result: No change of the watchlist status.

My interpretation of this behaviour: Creating a first caption is handled as page creation. And this is wrong.

Event Timeline

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Probably a bug in the slot handling code in EditPage (such as it is), but we'd need to check this out at our end first.

This will be due to the adding of a caption creating the mediainfo entity

in Wikibase, MediawikiEditEntity::getWatchDefault does not take into account slots creation vs page creation when using the "watchcreations" user pref.
It probably should now?

Ramsey-WMF triaged this task as Medium priority.
Ramsey-WMF added a subscriber: Ramsey-WMF.

following up on this: problem is still present as of today (may or may not have been fixed previously)

Adding depicts statements also adds pages to my watchlist even though I've switched that off for pages I edit in settings.

Cparle added a subscriber: Cparle.

At least for statements, this issue is still present – I just got a bunch of new watchlist entries from some AC/DC edits.

Any progress on it? It is really annoying to remove watchlist entries again after using AC/DC

Change 602777 had a related patch set uploaded (by Lucas Werkmeister; owner: Lucas Werkmeister):
[mediawiki/extensions/Wikibase@master] Fix watching new entities on existing pages

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

Change 602778 had a related patch set uploaded (by Lucas Werkmeister; owner: Lucas Werkmeister):
[mediawiki/extensions/WikibaseMediaInfo@master] Add integration test for watchlist behavior

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

Alright, I think I’ve found a fix for this. Adding the Wikidata campsite board for review, because the fix is actually in Wikibase, not WikibaseMediaInfo. (That said, review from the WikibaseMediaInfo people would help as well, especially for the integration test.)

Change 602777 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix watching new entities on existing pages

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

Change 602778 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add integration test for watchlist behavior

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