Last modified: 2014-02-04 10:56:16 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 T62653, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60653 - [Regression] Preference with value != default no longer saves properly
[Regression] Preference with value != default no longer saves properly
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: Matthew Flaschen
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-30 23:07 UTC by Matthew Flaschen
Modified: 2014-02-04 10:56 UTC (History)
7 users (show)

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


Attachments

Description Matthew Flaschen 2014-01-30 23:07:12 UTC
Before ff355e87e2f7a41a87c37f43232a44113cb033e0 (see https://git.wikimedia.org/blob/mediawiki%2Fcore.git/c0d3e85b06d628e5c4a7c93cfe5fb7587f9118f0/includes%2FUser.php#L4634 ), a preference would save in two conditions:

1. Default is null, and the saved value is neither exactly (===) false nor null.
2. Saved value != the default.

As a special case of #2, the value false *should* save, as long as the default value was != false.  For instance, this applies if the default is true, since false != true.  (Note, false == null, so there is no way false can save if null is the default).

This bug is on MediaWiki.org.
Comment 1 Gerrit Notification Bot 2014-01-30 23:39:01 UTC
Change 110473 had a related patch set uploaded by Mattflaschen:
Revert "User::saveOptions() optimization"

https://gerrit.wikimedia.org/r/110473
Comment 2 Gerrit Notification Bot 2014-01-31 00:40:15 UTC
Change 110477 had a related patch set uploaded by Mattflaschen:
Revert "User::saveOptions() optimization"

https://gerrit.wikimedia.org/r/110477
Comment 3 Gerrit Notification Bot 2014-01-31 00:41:57 UTC
Change 110473 merged by jenkins-bot:
Revert "User::saveOptions() optimization"

https://gerrit.wikimedia.org/r/110473
Comment 4 Matthew Flaschen 2014-01-31 00:46:51 UTC
Fixed in master.

To reproduce on MediaWiki.org:

1. Go to https://www.mediawiki.org/w/index.php?title=Special:Preferences#mw-prefsection-watchlist
2. Uncheck "Add pages I create and files I upload to my watchlist".
3. Click save

It stays checked.
Comment 5 Antoine "hashar" Musso (WMF) 2014-01-31 08:18:46 UTC
Sorry about that and thank you Matthew for the prompt reversion.  I should propose the patch again whenever I manage to write a test for this case and fix it up.
Comment 6 Antoine "hashar" Musso (WMF) 2014-01-31 08:20:30 UTC
Proposed again as https://gerrit.wikimedia.org/r/#/c/110516/
Comment 7 Gerrit Notification Bot 2014-02-04 00:29:52 UTC
Change 110477 merged by jenkins-bot:
Revert "User::saveOptions() optimization"

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

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


Navigation
Links