Page MenuHomePhabricator

Even if "Add pages I create to my watchlist" is set, uploading an image does not automatically watch it.
Closed, ResolvedPublic


To reproduce:

  1. Set "Add pages I create to my watchlist" to true in Commons user preferences.
  2. Upload an image to Commons.

Expected behavior:

The image description page is automatically watched.

Actual behavior:

The page is not watched.

Either this setting should automatically watch image pages when you upload an image (my preferred solution), or a separate explicit setting for this should be added.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:05 PM
bzimport set Reference to bz13725.
bzimport added a subscriber: Unknown Object (MLST).

Or, a new option can be added to "Add images I upload to my watchlist", perhaps?

Works for me.

Both 'Add pages I create to my watchlist' and 'Add pages I edit to my watchlist' seem to do the job, setting the watch checkbox state to on when you start at the upload form.

I confirmed that uploading a new file with the checkbox set adds it to my watchlist.

Odd, the code specifically checks if the dest is empty before checking it. Not sure why...

Probably because when you click "Upload a new version of this file" you get a URL with wpDestFile set. The idea of the old code was probably that if wpDestFile is set, it's an "edit" to the image, not a creation. In my opinion, though, a new version of a file should still count as a creation.

Regardless, wpDestFile does not always indicate a new version at all. Many tools set it even though there is no existing image. I originally ran into this issue using flinfo ( to upload Flickr images. It will set wpDestFile, though it's a new upload.

Tweaked it in r33387...

r33330 just disabled the check for wpDestFile, so that the 'watch pages i create'
setting would watch *all* uploads. The system now checks the actual value, so
it sets the watch checkbox if the requested file doesn't exist locally and you
have it set for creations, or if you've already got the file watched.

There are still some minor issues:

  • Since you have the chance to change the target filename on the form, the initial checkbox state can get out of sync if you switch from an empty file to an existing file or vice-versa.
  • Unlike the edit form, the upload form doesn't _unwatch_ a previously-watched page when the box is unchecked.