Page MenuHomePhabricator

Reply and new topic widgets don't update watchlist checkbox when watch star is toggled
Closed, ResolvedPublicBUG REPORT

Description

  1. Open the reply or new topic widget.
  2. Open the "advanced" tray
  3. Observe the "watch this page" checkbox is not checked (this bug does not apply when the checkbox is automatically selected because of your preferences)
  4. Use the watch star at the top of the page to watch the page
  5. Observe the "watch this page" checkbox is still not checked
  6. Post a comment
  7. Observe the page has been unwatched

Expected:

  1. The "watch this page" checkbox becomes checked
  1. The page is remains watched after posting

Original report

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
The message is posted, and the previously watched talk page is unwatched

What should have happened instead?:
The message is posted without affecting the watched status

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

  • Confirmed on both en.wikipedia and test.wikipedia
  • This only appears to be affecting user talk pages
  • Watching page API request
{
	"action": "watch",
	"format": "json",
	"formatversion": "2",
	"titles": "User_talk:TheresNoTime",
	"token": "x"
}
  • Posting new talk page section request
-----------------------------
Content-Disposition: form-data; name="action"

discussiontoolsedit
-----------------------------
Content-Disposition: form-data; name="format"

json
-----------------------------
Content-Disposition: form-data; name="formatversion"

2
-----------------------------
Content-Disposition: form-data; name="uselang"

en
-----------------------------
Content-Disposition: form-data; name="paction"

addtopic
-----------------------------
Content-Disposition: form-data; name="errorformat"

html
-----------------------------
Content-Disposition: form-data; name="errorlang"

en
-----------------------------
Content-Disposition: form-data; name="errorsuselocal"

true
-----------------------------
Content-Disposition: form-data; name="page"

User_talk:TheresNoTime
-----------------------------
Content-Disposition: form-data; name="commentname"

null
-----------------------------
Content-Disposition: form-data; name="assert"

user
-----------------------------
Content-Disposition: form-data; name="assertuser"

TheresNoTime
-----------------------------
Content-Disposition: form-data; name="dtenable"

1
-----------------------------
Content-Disposition: form-data; name="dttags"

discussiontools,discussiontools-source,discussiontools-source-enhanced,discussiontools-newtopic
-----------------------------
Content-Disposition: form-data; name="wikitext"

test4
-----------------------------
Content-Disposition: form-data; name="watchlist"

unwatch
-----------------------------
Content-Disposition: form-data; name="sectiontitle"

test4
-----------------------------
Content-Disposition: form-data; name="token"

x
-------------------------------

of the above, the section

Content-Disposition: form-data; name="watchlist"

unwatch

appears to be of note. Contrasted to what happens when I do the same at, e.g. https://test.wikipedia.org/wiki/Template_talk:SPIpriorcases

Content-Disposition: form-data; name="watchlist"

watch

If it helps, my watchlist preferences on test.wikipedia are:

Advanced options

  • Expand watchlist to show all changes, not just the most recent
  • Add direct unwatch/watch markers (×/+) to watched pages with changes (JavaScript required for toggle functionality)
  • Use non-JavaScript interface
  • Loads Watchlist without filters search or highlighting functionality.
  • Watch threads that I create or reply to
  • Show Wikidata edits in your watchlist

Watched pages

  • Add pages and files I edit to my watchlist
  • Add pages and files I move to my watchlist
  • Add pages and files I delete to my watchlist
  • Add pages I create and files I upload to my watchlist
  • Add pages where I have performed a rollback to my watchlist
  • Add new files I upload to my watchlist

Event Timeline

TheresNoTime renamed this task from Creating a new talk section using discussion tools unwatches the page to Creating a new user talk section using discussion tools unwatches the page.Oct 22 2021, 2:00 PM
TheresNoTime updated the task description. (Show Details)
TheresNoTime updated the task description. (Show Details)

Note that in the reply tool, there's a checkbox "Add this page to your watchlist" in the "Advanced" section.

It looks like this checkbox isn't updated when you watch or unwatch the page – it only reflects the state when you loaded the page. Screen recording:

In contrast, similar checkboxes in wikitext editor and visual editor are updated when you watch or unwatch. It should work that way in the reply tool too.

Note that in the reply tool, there's a checkbox "Add this page to your watchlist" in the "Advanced" section.

It looks like this checkbox isn't updated when you watch or unwatch the page – it only reflects the state when you loaded the page. Screen recording:
{F34706998}

In contrast, similar checkboxes in wikitext editor and visual editor are updated when you watch or unwatch. It should work that way in the reply tool too.

For what its worth, I can reproduce what you're describing 😃

Esanders renamed this task from Creating a new user talk section using discussion tools unwatches the page to Reply and new topic widgets don't update watchlist checkbox when watch star is toggled.Oct 25 2021, 2:31 PM
Esanders updated the task description. (Show Details)

Change 734284 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Update watchlist checkbox when main watchstar is changed

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

Change 734284 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Update watchlist checkbox when main watchstar is changed

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