Page MenuHomePhabricator

When uploading a new version of a file watch this page is not automatic
Open, LowPublic

Description

Author: lcarsdata

Description:
When uploading a new version of a file the 'watch this page' check box is not
automatically checked if you are already watching the page already.


Version: unspecified
Severity: normal

Details

Reference
bz9246

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:36 PM
bzimport set Reference to bz9246.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 3478
Proposed patch

attachment watchupload.patch ignored as obsolete

(In reply to comment #1)

Created an attachment (id=3478) [edit]
Proposed patch

Patch tested, but in consequence I expect that unchecking the 'watch this page'
check box the page will be unwatched after reupload. This doesn't happen with
this patch.

That behavior would match editing behavior, so that's fine.

Or... do you mean it won't happen, but you would expect it to, so the patch is
incomplete? Hrmffffllll

It does not happen, the patch is incomplete.

robert wrote:

Patch that fixes this bug

This bug is based upon the previous patch but also acts upon an unchecked watch state.

attachment upload_watch.diff ignored as obsolete

Reverted in r30163.

A problem with this is that it *un*watches a previously watched image under the following circumstances:

  • 'watch pages I edit' is not enabled (eg, default state)
  • go to Special:Upload and select the file
  • hit 'upload'

The initial check state is unchecked (since there was no initial destination name set), and this doesn't get updated to reflect the existing watch state of the previous image.

There are a couple possible ways around this. One is to compare the form's actual initial check state with the submitted check state and only apply an unwatch if there was a difference.

Another might be to do a watch state update via AJAX when a new destination filename is set in the form. This would allow the checkmark's default state to be set 'properly' for those with JS enabled in modern browsers.

Perhaps a combination should be used.

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*