Page MenuHomePhabricator

Default user option for Reference Previews changed for users created before 2017/08/16 without any justification
Open, Needs TriagePublicBUG REPORT

Description

Upon closer investigation, I noticed that commit a75ddc41 and 33f9e9d3 for T364347 effectively changed the default user option value of popups-reference-previews for users created before 2017/08/16 without any justification.

Before commit a75ddc41:

  • extension.json:
    • "popups-reference-previews": 0, but this is not the final default value being used in production
    • "PopupsReferencePreviews": { ... "value": true }, this set the PopupsReferencePreviews config to true
  • includes/PopupsHooks.php:
    • onUserGetDefaultOptions: Set the actual default value of popups-reference-previews to '1' when PopupsReferencePreviews is true, which is true by default - resulting in popups-reference-previews default for all users.
    • onLocalUserCreated: Set the value of popups-reference-previews when PopupsReferencePreviews is true - this is redundant! The value it set is the same as the default value by onUserGetDefaultOptions, and gives us a false image that this user option is also related to the user creation date as popups. This can be verified with comment from Tgr in T54777#7651262 2 years ago, where new accounts don't have the popups-reference-previews option set.
In T54777#7651262, @ Tgr wrote:

enwiki has about 200 million user_properties rows today (for about 40 million users); a newly registered user has 12 rows:

+------------------------------------------+---------------------------------------------------+
| up_property                              | up_value                                          |
+------------------------------------------+---------------------------------------------------+
| VectorSkinVersion                        | 1                                                 |
| echo-subscriptions-email-article-linked  | 1                                                 |
| echo-subscriptions-email-dt-subscription | 1                                                 |
| echo-subscriptions-email-edit-thank      | 1                                                 |
| echo-subscriptions-email-mention         | 1                                                 |
| echo-subscriptions-email-page-review     | 1                                                 |
| echo-subscriptions-web-article-linked    | 1                                                 |
| echo-subscriptions-web-reverted          | 0                                                 |
| popups                                   | 1                                                 |
| rcenhancedfilters-seen-tour              | 1                                                 |
| welcomesurvey-responses                  | {"_group":"NONE","_render_date":"20220126054124"} |
| wlenhancedfilters-seen-tour              | 1                                                 |
+------------------------------------------+---------------------------------------------------+

Commit a75ddc41:

  • extension.json:
	"ConditionalUserOptions": {
		"popups": [...],
		"popups-reference-previews": [
			[
				1,
				[
					"registered-after",
					"20170816000000"
				]
			],
			[
				0,
				[
					"named-user"
				]
			]
		]
	}
  • includes/PopupsHooks.php:
    • onUserGetDefaultOptions: Removed, the PopupsOptInDefaultState config and PopupsReferencePreviews config are not honored

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I also can not reproduce this issue. - What I did:


I guess the key is the possible confusion about "ReferencePreviews" ( the Cite extension feature ) vs "ReferenceTooltips" ( the gadget ). Because the latter does not seem to work when I try to use it as described above. ( Just disable ReferencePreviews in the settings and enable ReferenceTooltips in the gadgets.

Please check on different language Wikipedias too. Do you have global setting for this preference? I don't.

Jdlrobson changed the task status from Open to Stalled.EditedMon, Jun 3, 6:02 PM
Jdlrobson subscribed.

I also can't replicate this as a logged in user with/without global preference. Note, the feature is disabled if the ReferenceTooltips gadget is enabled, and on many wikis it is enabled by default ( 😓 ).

What would be helpful to debug this:
1)Screenshot/documentation of values set in "Reading preferences" options at https://en.wikipedia.org/wiki/Special:Preferences

  1. Screenshot/documentation of values set in in "Reading preferences" options on global preferences https://en.wikipedia.org/wiki/Special:GlobalPreferences#mw-prefsection-rendering
  2. Screenshot/documentation of enabled gadgets in https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-gadgets

The function works consistent with the setting. The problem is that a couple of days ago the setting changed from on to off. Even now if I go to a new language version, dewiki, frwiki or eswiki, the setting is off by default. I didn't set global value for this preference. I don't use the Reference Tooltips gadget, it is not set on by default. It happened to others too on huwiki.

refprev1.jpg (274×996 px, 41 KB)

The default value for this feature is disabled (although I'm not sure why):
https://github.com/wikimedia/mediawiki-extensions-Popups/blob/aa514c485d74932f596dae71ae55fb5c1cd7b5de/extension.json#L216

I was looking at this recently when filing T365538 - perhaps this could be changed to enabled by default as part of that work?

Why does it work for not logged in users and doesn't for logged in users? Like it's turned off on purpose.

Shizhao changed the task status from Stalled to Open.Thu, Jun 6, 12:30 PM
Shizhao subscribed.
在T366419#9857143中,@Bean49写道:

The function works consistent with the setting. The problem is that a couple of days ago the setting changed from on to off. Even now if I go to a new language version, dewiki, frwiki or eswiki, the setting is off by default. I didn't set global value for this preference. I don't use the Reference Tooltips gadget, it is not set on by default. It happened to others too on huwiki.

per Bean49

Shizhao changed the subtype of this task from "Bug Report" to "Task".Thu, Jun 6, 12:31 PM
Bean49 changed the subtype of this task from "Task" to "Bug Report".Fri, Jun 7, 10:38 AM

Reference Previews default value for logged in users does not match the default value for not logged in users.
Steps to replicate the issue (include links if applicable):

What happens?:

The value is off instead of on.

What should have happened instead?:

Match the on value for not logged in users.

Jdlrobson renamed this task from Reference Previews stopped working for logged in users to Global preference for Reference Previews stopped working for logged in users.Fri, Jun 7, 2:04 PM
Jdlrobson updated the task description. (Show Details)

I can't even change the value, because there is no Set a local exception for this global preference. On some language versions it is possible to change it.

If there is no local exception, the preference is global.

There does seem like a bug here, but I'm not sure where but it seems to relate to GlobalPreferences not reference previews itself since you are referring to the "local exception" message.

My situation is not what you are saying. I said it twice that I didn't set a global value for this preference. What you say in the task description is not true. This is not the problem I'm reporting.
Once again. I don't have global setting. If I view it not logged in, Reference Previews is on. If I view it logged in, Reference Previews is off, despite I never set it off, in a language version I haven't visited recently. You can replicate it as I described before. In some languages I can change the setting, in some languages I can't, the setting is disabled. "Set a local exception" is not present, because I don't have global value set, I assume. Please replicate and verify.

image.png (205×1 px, 29 KB)

image.png (315×990 px, 40 KB)

image.png (306×994 px, 34 KB)

I noticed afterwards that disabled setting is from Reference Tooltips gadget. Remains my original problem.

Func subscribed.

I noticed afterwards that disabled setting is from Reference Tooltips gadget. Remains my original problem.

Yeah, that preference would be disabled when the Reference Tooltips gadget is enabled, so you can't change it, as the description under it states. You may want to update the task description to highlight your remaining problem.

If I view it logged in, Reference Previews is off, despite I never set it off,

I'm trying to understand this issue, but it's not clear exactly what the bug is that you are reporting?

As I said in T366419#9857356 already - that disabled is the default value:

  • It is off by default, so this is exactly what is meant to happen.
  • If the gadget is enabled (which is the default on many wikis) you can't change it at all, until you disable it on the gadgets page, as @Func has explained.

The fixes are:

  • Disable the gadget locally (gadgets are not global so you have to do this on every wiki where the interface admins decided it should be default)
  • Enable/disable it as a global preference.
Jdlrobson changed the task status from Open to Stalled.Fri, Jun 7, 3:36 PM

Forget the gadget. We are talking the situation when the gadget is disabled.
Reference Previews: if disabled is the default value, as you say, then why does it work for not logged in users? It's not consistent with what you say. I don't understand.

What is enabled for anon users, is the Reference Tooltips gadget. Gadgets cannot be disabled individually for anon users, you can only disable all local wiki scripts with the ?safemode=1 query string.

Func renamed this task from Global preference for Reference Previews stopped working for logged in users to Reference Previews stopped working for logged in users.Fri, Jun 7, 3:44 PM
Func closed this task as Invalid.

What is enabled for anon users, is the Reference Tooltips gadget. Gadgets cannot be disabled individually for anon users, you can only disable all local wiki scripts with the ?safemode=1 query string.

That's not true. The gadget not even exists on slwiki for example. Could you please support your affirmation?

Jdlrobson changed the task status from Open to Stalled.Fri, Jun 7, 4:01 PM

The title of this ticket is "Reference Previews stopped working for logged in users" It seems you are now asking about logged out users. Please take some time to clearly articulate clearly the exact bug you are reporting here, to avoid creating more confusion.

Also, please stop changing the status of this ticket. That field is not for you - it is for the maintainers of the codebase and all you are doing is irritating people that want to and can help get to the bottom of this.

Logged out users appear to be disabled by default according to this configuration:
https://gerrit.wikimedia.org/g/mediawiki/extensions/Popups/+/96e9c555b18883c33fea1d7e511fd845e70495c0/extension.json#206
This has been true since 2021. @WMDE-Fisch is there good reason why this has not been enabled for anonymous users? Or did this use to work somehow (perhaps broken as part of the move to Cite?)

Jdlrobson renamed this task from Reference Previews stopped working for logged in users to Reference Previews stopped working for logged out users.Fri, Jun 7, 4:04 PM
Jdlrobson updated the task description. (Show Details)

@WMDE-Fisch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/1033398/10/includes/PopupsHooks.php#b259 looks suspicious. PopupsReferencePreviews appears to always be true, so I think this hook was previously setting it to 0, perhaps the default in extension.json should be 1 now and PopupsReferencePreviews can be completely removed?

Ah, I see, I think I got something, but I cannot verify it myself, because I don't have an old enough account (though not sure if it's needed).

Deployment of changes to $wgConditionalUserOptions may have unexpected behaviour, and the date matches @Izno's comment.

  • Especially, the change to the popups-reference-previews preference is not done in one commit, there are 33f9e9d and 133be4e, and the first one uses an integer instead of a string for the value.

I can reproduce this in either dark or light mode with safe mode on at https://en.wikipedia.org/wiki/Hand_Me_Down_World?safemode=1 in Firefox 126 for Windows 10, and noticed this a day or two ago separately on a different page.

Ok, checked my preferences. I had neither the gadget nor the preference turned on. Turning the preference on works as expected.

I guess it's possible one of them got turned off somehow? I didn't modify it myself.

@Jdlrobson I don't understand why you are doing this. Where did I say that doesn't work for anon users?

  1. Reference Previews is enabled and does work for anon users.
  2. It is disabled for logged in users.
  3. You can replicate it as I described.

This is the bug I'm reporting. It was on, and from one point went off without any intervention. It is off even now for "new" wikis I visit.

I am not seeing any bug here based on how everything has been configured. I'm sorry I can't be of more help here.

Fisch, please feel free to re-subscribe me or add me to any Gerrit patches if you need my help in anyway.

Bean49 renamed this task from Reference Previews stopped working for logged out users to Reference Previews went disabled for logged in users.Fri, Jun 7, 4:31 PM
Bean49 updated the task description. (Show Details)

I am not seeing any bug here based on how everything has been configured. I'm sorry I can't be of more help here.

The two default values (anons and logged in) does not match. It is ON for the former, and OFF for the latter. You can see it for yourself if you try.

It is disabled for logged in users.

This is because your account is older than 2017/08/16 on the wiki you are visiting. The differences of default values may be confusing, but that's the current situation. Due to this nature, you should not expect that everyone can reproduce the issue you report.

It's possible that the deployment of the wrong config change (33f9e9d) and/or database cleanups after that affected your preference value (if that's enabled before), we cannot do anything about this, you would need to enable that preference manually.

By the way, according to Special:CentralAuth/Bean49 (sort by "Attached on"), you didn't visit a "new" wiki recently.

Thanks. By "new" I meant "new visit since the problem exists" (few days). For example slwiki.

Current situation is as if I were set it OFF. Couldn't this status be cleared in the database?

Func renamed this task from Reference Previews went disabled for logged in users to Default user option for Reference Previews changed for users created before 2017/08/16 without any justification.Fri, Jun 7, 7:05 PM
Func changed the task status from Stalled to Open.
Func updated the task description. (Show Details)

Change #1039596 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/Popups@master] Restore the original behaviour of Reference Previews

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

@Jdlrobson Sorry, I have to re-subscribe you since I identified the cause and there is indeed a real bug.

Func updated the task description. (Show Details)

Change #1039597 had a related patch set uploaded (by Func; author: Func):

[operations/mediawiki-config@master] CommonSettings: Restore the original behaviour of Reference Previews

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

For the proposed Tech News entry (per User-notice), please could someone suggest how to phrase it?
I am uncertain what aspects need to be highlighted.
Plus it seems like the latest patches may change the information.
(i.e. Is this purely an informational announcement about a bug (and is the bug now fixed? or will be soon?), or is any action required from any sub-group of editors?).
Thanks.

This is not ready to announce until someone from WMDE has taken a look at this and confirmed what has happened here.

Hello @Bean49, @Quiddity and all,

Thank you for making us aware of this and allowing the TechWish team to review before the fix is released.
Momentarily the team is focused on an important feature for our focus area, which we are pressed in time to make progress on.
We have discussed that once we feel we have made enough progress on our topic and capacity is available we will pick this item up.
Until then, I ask for your patience but be rest assured it's been acknowledged and is on our watchlist.

Thanks!
Lina PM with the TechWish team

I've approved the patches, thank you @Func for debugging and preparing these, and to @Bean49 for the report. There was indeed some historical complexity, but at this moment our intent is that the reference previews subfeature should be enabled by default, and the only exceptions are when conflicting gadgets are enabled or the Popups extension is missing or disabled—none of these need to be tracked in user preferences.

I've approved the patches,

Sorry, but +1 on Popups does not mean approval, should you change it to +2 or someone else should approve?

Sorry, but +1 on Popups does not mean approval, should you change it to +2 or someone else should approve?

Since there have been several people tagged on the issue, I'm giving others a few more days to react. I can merge next Monday, if that sounds good?

@awight thanks for clarifying - are you also able to complete T355194 (specifically T363162?) as this confusion could have been avoided if that code has been fully moved over.

How is this impacting users right now? My understanding is some logged out users might not be getting the feature on wikis where no gadget is enabled?

How is this impacting users right now? My understanding is some logged out users might not be getting the feature on wikis where no gadget is enabled?

Users CREATED BEFORE 2017/08/16 are not getting the feature, which is stated in the ticket name.

I think we may need some words from the Web team. Why was someone assigned to do T364347 just a few days before their "last day", on the codebase that is not the Web team's main focus, and then just left the bug for WMDE to look into? While WMDE was not involved in the bugged change and thus was not very familiar with either the original task or the problem.