Page MenuHomePhabricator

Watchlist param days=30 doesn't override user preference 'watchlistdays' = 0
Closed, ResolvedPublic

Description

For a couple of weeks my watchlist page (https://en.wikipedia.org/wiki/Special:Watchlist) hasn't been displaying any changes made to any of the pages I watch.

As you can see from the above screenshot, there are no obvious network errors or any exceptions being raised in the console. Tested in Firefox 32-bit ESR 52.3.0 and IE11 on 64-bit Windows 7.

Steps to Reproduce

Actual Results

The watchlist reports there are no changes to display regardless of what filtering options are supplied. Even though there are definitely changes to display. This occurs every time I visit.

Expected Results

The watchlist should report changes made to pages being watched.

Attempted Troubleshooting

I've attempted to purge the page with the action=purge parameter (https://en.wikipedia.org/wiki/Special:Watchlist?action=purge) but that doesn't appear to be a valid option.

Interestingly, changes do appear in my RSS subscription to that page (https://en.wikipedia.org/w/api.php?action=feedwatchlist&allrev=1&wlowner=Dasime&wltoken=REDACTED&feedformat=atom):

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://en.wikipedia.org/w/api.php?action=feedwatchlist&amp;allrev=1&amp;wlowner=Dasime&amp;wltoken=REDACTED&amp;feedformat=atom</id>
		<title>Wikipedia - Watchlist [en]</title>
		<link rel="self" type="application/atom+xml" href="https://en.wikipedia.org/w/api.php?action=feedwatchlist&amp;allrev=1&amp;wlowner=Dasime&amp;wltoken=REDACTED&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="https://en.wikipedia.org/wiki/Special:Watchlist"/>
		<updated>2017-09-16T11:52:57Z</updated>
		<subtitle>Watchlist</subtitle>
		<generator>MediaWiki 1.30.0-wmf.18</generator>

	<entry>
		<id>https://en.wikipedia.org/w/index.php?title=User:Dasime&amp;diff=800901130</id>
		<title>User:Dasime</title>
		<link rel="alternate" type="text/html" href="https://en.wikipedia.org/w/index.php?title=User:Dasime&amp;diff=800901130"/>
				<updated>2017-09-16T11:49:01Z</updated>
		
		<summary type="html">Testing Watchlist (Dasime)</summary>
		<author><name>Dasime</name></author>	</entry>

	</feed>

But the changes only appear for a short amount of time. Long enough for my RSS reader to cache them but if I go back to the feed a few days later it's always empty again.

I've regenerated my token at https://en.wikipedia.org/wiki/Special:ResetTokens and it didn't resolve my issue - new changes appear briefly in the feed but then disappear after a while.

Event Timeline

dasime created this task.Sep 16 2017, 12:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2017, 12:18 PM

I tested and I not seen problem.

Reedy updated the task description. (Show Details)

Approximately how many entries does your watchlist have? ("Raw watchlist" might display that).
Is there any Developer Tools output when going to https://en.wikipedia.org/wiki/Special:Watchlist?safemode=1&debug=true instead?

Approximately how many entries does your watchlist have? ("Raw watchlist" might display that).

On my raw watchlist (https://en.wikipedia.org/wiki/Special:EditWatchlist/raw) I have 27 pages.

Is there any Developer Tools output when going to https://en.wikipedia.org/wiki/Special:Watchlist?safemode=1&debug=true instead?

There was nothing output to the console at all, not even the jQuery depreciation warnings that the page raises on the usual endpoint. The only difference was there were 136 requests rather than the 21 I saw previously.

Just wanted to bump this ticket as I'm still having the same issue. I would appreciate it if I could get some feedback on resolving this.

Reedy added a subscriber: Reedy.Nov 18 2017, 8:25 PM
mysql:wikiadmin@db1089 [enwiki]> select rev_timestamp from watchlist INNER JOIN page ON ( page_namespace = wl_namespace and page_title = wl_title ) INNER JOIN revision ON page_latest=rev_id where wl_user = 227048 ORDER BY rev_timestamp;
+----------------+
| rev_timestamp  |
+----------------+
| 20100618042348 |
| 20101024103134 |
| 20120308094233 |
| 20120711233705 |
| 20120927213821 |
| 20121015161137 |
| 20131215142310 |
| 20131218085800 |
| 20140916090707 |
| 20150104041709 |
| 20150105152016 |
| 20150217151755 |
| 20150724120017 |
| 20160228212751 |
| 20160831220244 |
| 20160915042438 |
| 20161001170654 |
| 20170127145407 |
| 20170310183616 |
| 20170322001547 |
| 20170330210645 |
| 20170411090147 |
| 20170426021324 |
| 20170704205415 |
| 20170712194452 |
| 20170804173458 |
| 20170805130836 |
| 20170810103646 |
| 20170908115130 |
| 20170911123300 |
| 20170916114901 |
| 20170923145906 |
| 20170930090501 |
| 20171001053150 |
| 20171007172250 |
| 20171007172250 |
| 20171012153851 |
| 20171012201239 |
| 20171012201310 |
| 20171012232602 |
| 20171014225923 |
| 20171017155917 |
| 20171024084305 |
| 20171024195003 |
| 20171025175050 |
| 20171027164250 |
| 20171027164251 |
| 20171031033923 |
| 20171031143531 |
| 20171109013729 |
| 20171110115828 |
| 20171114132716 |
| 20171116093746 |
| 20171116163344 |
| 20171117191901 |
+----------------+
55 rows in set (0.00 sec)

The pages in your watchlist are definitely being updated

If you go to https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-watchlist... What does it tell you for "Days to show in watchlist:"? It seems to be set to 0 for your user... Which I'm guessing is the problem

Can you set it to 1 or more? And see if it works?

I do wonder if we should allow this to be set to 0.. It seems a weird value for the option.

I can confirm that setting the "Days to show in watchlist" to > 0 does make revisions display in the watchlist!

Thanks for pointing out this configuration. I have no idea how it got set to zero - it definitely isn't something I remember doing but I can't imagine this would have just set itself.

I'm not sure what the intended usecase of setting either option to zero was; because it doesn't completely disable the watchlist - as my RSS feed was still partially working while I had them both at zero.

Additionally, it appears the "Days to show in watchlist" configuration set in Special:Preferences takes precedent over the "Period of time to display" configuration set on Special:Watchlist which doesn't seem all that intuitive.

In the interest of avoiding anybody else making this mistake another non-development solution might be to better promote the Special:Preferences#mw-prefsection-watchlist section from the Special:Watchlist page. There are already links for Special:EditWatchlist, Special:EditWatchlist/raw and Special:EditWatchlist/clear on this page so an "Edit watchlist settings" link wouldn't be too amiss.

Thanks for taking a look at my issue. I'm glad it was so simple to resolve.

Reedy added a comment.Nov 19 2017, 9:29 AM

See also T176857: Watchlist links with "&days=0" give an incorrect display, T116971: Special:Watchlist takes 23 seconds to start loading on mediawiki.org, T172026: [wmf.11] "Number of edits to show in recent changes ..." form accepts invalid numbers

Additionally, it appears the "Days to show in watchlist" configuration set in Special:Preferences takes precedent over the "Period of time to display" configuration set on Special:Watchlist which doesn't seem all that intuitive.

What do you mean takes precedent? Does changing "Period of time to display" not work if the preference is set to 0?

In the interest of avoiding anybody else making this mistake another non-development solution might be to better promote the Special:Preferences#mw-prefsection-watchlist section from the Special:Watchlist page. There are already links for Special:EditWatchlist, Special:EditWatchlist/raw and Special:EditWatchlist/clear on this page so an "Edit watchlist settings" link wouldn't be too amiss.

Seems reasonable to me... Would be worth filing as a separate task, and referencing this one though :)

dasime added a comment.EditedNov 19 2017, 11:16 AM

Additionally, it appears the "Days to show in watchlist" configuration set in Special:Preferences takes precedent over the "Period of time to display" configuration set on Special:Watchlist which doesn't seem all that intuitive.

What do you mean takes precedent? Does changing "Period of time to display" not work if the preference is set to 0?

Correct. My original issue was my Special:Watchlist didn't show any changes on it regardless of what value I put in "Period of time to display". After I updated "Days to show in watchlist" in Special:Preferences to non-zero changes were displayed again. I've just confirmed this is still the case by setting "Days to show in watchlist" back to 0 and it made changes that were loaded on Special:Watchlist not load again after I refreshed the page.

EDIT: Accidentally used a keyboard shortcut to publish this comment before I had finished writing it.

Reedy added a comment.Nov 19 2017, 1:29 PM

You did hit "show" after changing the value on Special:Watchlist? Just checking... As it does sound like there's some bug here...

You did hit "show" after changing the value on Special:Watchlist? Just checking... As it does sound like there's some bug here...

Yes - although you did make me doubt myself then! If I set both "Days to show in watchlist" and "Maximum number of changes to show in watchlist" in Special:Preferences to zero then regardless of what date range I select on Special:Watchlist I can't see any changes. See the screenshot attached below - I've included the URL so you're able to see I have hit submit but the body of Special:Watchlist says "No changes during the given period match these criteria." although you've already confirmed that isn't true with your SQL query.

Reedy renamed this task from Watchlist isn't displaying changes to Watchlist param days=30 doesn't override user preference 'watchlistdays' = 0.Nov 19 2017, 1:48 PM

In the interest of avoiding anybody else making this mistake another non-development solution might be to better promote the Special:Preferences#mw-prefsection-watchlist section from the Special:Watchlist page. There are already links for Special:EditWatchlist, Special:EditWatchlist/raw and Special:EditWatchlist/clear on this page so an "Edit watchlist settings" link wouldn't be too amiss.

Seems reasonable to me... Would be worth filing as a separate task, and referencing this one though :)

I've created a feature request here: T180906: Add a deeplink from Special:Watchlist to watchlist in Special:Preferences.

Reedy added a comment.Nov 19 2017, 2:08 PM

Thanks :)

We'll keep this one open for the bug with the setting of the preference vs the override on Special:Watchlist

Krinkle added a subscriber: Krinkle.Apr 8 2018, 6:45 PM

Today viewing my watchlist plain on Wikimedia Commons via https://commons.wikimedia.org/wiki/Special:Watchlist showed no results. Rather unexpected.

As a user, I would expect the default state of the "Watchlist options" form to match the options used for current query. However, this isn't true. When opening the watchlist, I noticed that internally it is querying for last "0 days", which is non-sensical. Yet, the options form shows "30 days". And when submitting the form as-is without any modification, makes results show up.

Looking at the preferences:

I don't understand why it would be set to 0. That does seem strange. I vaguely recall this being a shortcut (even documented in the UI at some point I think?). The shortcut would mean to automatically use "the maximum". This may've been common among power users given that the age cut-off for recent changes varies by wiki, and even got changed on individual wikis over time (30 days, 60 days, 90 days). And in order to default to going the most far back, one would use 0.

Looking in the database, see there's over 1,000 other users with the same setting:

db1091(commonswiki)>SELECT up_value, COUNT(*) FROM user_properties WHERE up_property='watchlistdays' GROUP BY up_value;
+------------+----------+
| up_value   | COUNT(*) |
+------------+----------+
|            |       13 |
| 0          |     1060 |
| 7          |     4120 |
| 14         |      135 |
| 30         |     1836 |
[..] other
Restricted Application added a project: Growth-Team. · View Herald TranscriptJul 8 2018, 10:03 AM

Based on this and T198961 I've created T199049 to (hopefully) resolve the issues.

I don't understand why it would be set to 0. That does seem strange. I vaguely recall this being a shortcut (even documented in the UI at some point I think?). The shortcut would mean to automatically use "the maximum". This may've been common among power users given that the age cut-off for recent changes varies by wiki, and even got changed on individual wikis over time (30 days, 60 days, 90 days). And in order to default to going the most far back, one would use 0.

I recall I used to see occasional advice to set Maximum number of changes to show in expanded watchlist to 0 (e.g. penultimate comment here), but I can't find anything officially documenting it (I checked some random historic versions of the various help pages at enwiki/meta/mw).

JTannerWMF edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
JTannerWMF moved this task from Incoming to QA on the Growth-Team (Current Sprint) board.

You did hit "show" after changing the value on Special:Watchlist? Just checking... As it does sound like there's some bug here...

Yes - although you did make me doubt myself then! If I set both "Days to show in watchlist" and "Maximum number of changes to show in watchlist" in Special:Preferences to zero then regardless of what date range I select on Special:Watchlist I can't see any changes. See the screenshot attached below - I've included the URL so you're able to see I have hit submit but the body of Special:Watchlist says "No changes during the given period match these criteria." although you've already confirmed that isn't true with your SQL query.

days does override the Watchlist preference for number of days, the problem is that there's no limit parameter in the URL, so the query operates off the default in your preferences which is zero (interpreted as 0 and not as the maximum). The same issue exists in for RecentChanges, it's just not as noticeable since the UI provides links with minimum values of 1 for days and 50 for number of changes. In the old Watchlist UI, there's only an option for number of days, so unless you know to add limit={some_value} in the URL, you'll see no results.

IMO, we should close this task and handle the various questions around this in the parent task, T199049: Value of 0 for "Days to show in watchlist" or "Maximum number of changes to show in watchlist" setting breaks watchlists; should instead be interpreted as maximum or no limit.

We are considering this for Growth team maintenance work.

Looking in the database, see there's over 1,000 other users with the same setting:

I checked a few other wikis. enwiki has 26793 users with watchlistdays set to 0, dewiki has 6251, and the other large wikis I checked are also all over 1000 (1507 on zhwiki, 1404 on jawiki, 2247 on frwiki).

Change 458517 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] Watchlist preferences: Disallow zero value for days/limit

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

Change 458517 merged by jenkins-bot:
[mediawiki/core@master] Watchlist preferences: Disallow zero value for days/limit

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