Page MenuHomePhabricator

Watchlist expiry not set when saving page edit
Closed, ResolvedPublicBUG REPORT

Description

Reported at en.wikipedia village pump

Steps to reproduce

  • Edit a currently unwatched page using either VisualEditor, or the 2017 wikitext editor
  • When saving select "Watch this page" and an expiry time
  • Select "Publish changes"

Screenshot 2025-06-24 at 12.09.31.png (381×511 px, 56 KB)

Expected result

  • Page is added to my watchlist with the given expiry time

Actual result

  • Page is added to my watchlist permanently

This doesn't seem to happen when using the 2010 wikitext editor

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

…And the reason that fixes it is that the VE API actually does not have a parameter to set the watchlist expiry. The VE frontend passes the value in the wpWatchlistExpiry parameter, which then passes transparently through all the API layers (which all think that the expiry parameter was omitted), and which is handled directly in EditPage. This seems like a bug, and it just works due to a series of lucky accidents :)

This should be resolved by the patch on the subtask, please check. Thanks!

Change #1165010 had a related patch set uploaded (by 1F616EMO; author: 1F616EMO):

[mediawiki/extensions/VisualEditor@master] ext.visualEditor.articleTarget: Corrects the POST key of wpWatchlistExpiry

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

Change #1165010 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] ext.visualEditor.articleTarget: Corrects the POST key of wpWatchlistExpiry

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

Thanks for checking @Pcoombe and thanks for the patch @1F616EMO. My change has fixed using the default expiry time from preferences, but it didn't fix choosing one in the dropdown while editing. Now both should be fixed.

I found a failing post-merge build: https://integration.wikimedia.org/ci/job/mwext-codehealth-master-non-voting/75504/console. Are there anything I should do?

This is a non-voting check, so it's ok to have it failed. No action needed.

Nice, marking this as resolved.