Last modified: 2011-09-17 20:23:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32941, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30941 - Set default user options for gadgets that are enabled by default
Set default user options for gadgets that are enabled by default
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Gadgets (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Krinkle
:
Depends on: 30940
Blocks: 30942
  Show dependency treegraph
 
Reported: 2011-09-17 00:54 UTC by Krinkle
Modified: 2011-09-17 20:23 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-09-17 00:54:27 UTC
There currently is a bug in 1.18 branch of Gadgets (and trunk as well) that gadgets that are enabled by default cannot be disabled.

The reason is simple. HTMLForm is given a set of names that are should have ticked checkboxes. Gadgets extension gives the names here of gadgets that are either "user-enabled" or "default-enabled and not user-disabled". That's OK to be mixed when outputting checkboxes. But when processing the form submission, HTMLForm simply has to know the defaults separate from user-enabled, otherwise when it's checking wgDefaultUserOptions and finds no default value, it will assume that the user has set this value and wants to keep it.

However, this is currently impossible to fix because wgDefaultUserOptions can only be set globally, and not until after the gadgets have been parsed will it know which are default on.

As soon as bug 30940 has been done, Gadgets needs to make use of it.
Comment 1 Krinkle 2011-09-17 00:58:20 UTC
I confirmed that bug 30942  is caused by this.

Setting the following in LocalSettings.php fixed bug 30942  for gadget 'X':

$wgDefaultUserOptions['gadget-A'] = 1;
Comment 2 Krinkle 2011-09-17 02:46:35 UTC
Done in r97366.

Keeping bug open until it's been done in trunk as well.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links