Page MenuHomePhabricator

When protecting a non-existent page, the API uses wrong preference to determine whether to watch page
Closed, ResolvedPublic


When you use the API to protect a non-existent page with protections=create=sysop and watchlist=preferences, it seems to use the value of the "Add pages I create and files I upload to my watchlist" (wpWatchCreations) preference to decide whether or not to add the page to your watchlist.

Since no page is actually being created, this seems inappropriate.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:19 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz56766.
bzimport added a subscriber: Unknown Object (MLST).

This is easy to fix, but I'm just not sure what it should be changed to use... my gut feeling is to make watchlist=preferences behave like watchlist=no in this case. The other option would be to add a new pref (= sadness).

The correct behavior would be to match that of the web UI, which uses 'watchdefault' ("watch pages I edit") for this situation.

Change 94399 had a related patch set uploaded by Anomie:
Cleanup watchlist preference usage

Change 94399 merged by jenkins-bot:
Cleanup watchlist preference usage