Steps to replicate the issue (include links if applicable):
- Edit with the VisualEditor
- Before submitting the edit, set the watching duration to anything but no and infinity
What happens?: The page is watched, but the duration is not set - it is watched indefinitely.
What should have happened instead?: The page should be watched for the set duration, not forever.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): WMF site, at least on zhwiki, not tested elsewhere reproducable on enwiki and arywiki
Other information (browser name/version, screenshots, etc.):
- Browser information: Firefox 140.0.2 on Arch Linux
- Discussion on zhwiki: Wikipedia:互助客栈/技术#視覺化編輯器 監視列表時限失效
Some technical investigation, correct me if I am wrong:
- The checkbox with the class ve-ui-mwSaveDialog-checkbox-wpWatchlistExpiry is created.
- This field does not exist in the fieldMap of ve.init.mw.ArticleTarget.prototype.getSaveOptions, causing its key to not be manipulated.
- Here, it should be changed to watchlistexpiry, a parameter recognized by the edit API and not intercepted by the VE API, that correctly sets the watch expiry. By forging requests, it is confirmed that watchlistexpiry works.
- Neither the VE API nor the edit API recognizes the key, and hence, the expiry is not set. However, watchlist=watch also exists in the request, resulting in an indefinite watch.
- It should be noted that the returned values from the edit API, watched and watchlistexpiry, are correctly handled by the VE API handler. Therefore, if the duration was somehow successfully set (e.g. by applying my patch), visuals work as expected.