Last modified: 2013-03-28 03:01:18 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 T7495, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5495 - Enotif checkboxes cleared upon save before address is confirmed
Enotif checkboxes cleared upon save before address is confirmed
Status: NEW
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.10.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-07 18:34 UTC by Alan Harder
Modified: 2013-03-28 03:01 UTC (History)
7 users (show)

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


Attachments
Add hidden form inputs for checked+disabled checkboxes (1.76 KB, patch)
2006-04-17 15:55 UTC, Alan Harder
Details
Add hidden form inputs for checked+disabled checkboxes (2.35 KB, patch)
2007-02-28 20:39 UTC, Alan Harder
Details
Add hidden form inputs for checked+disabled checkboxes (2.55 KB, patch)
2007-03-06 19:46 UTC, Alan Harder
Details

Description Alan Harder 2006-04-07 18:34:51 UTC
Found this in 1.6.1, confirmed same in current svn.

In the "Email" box of the "User Profile" tab of User Preferences.  Before any
email address is provided, the checkboxes are enabled (not sure if they should
be, but that's another topic).  You can save some changes.  Enter an email
address and save.  Now the email box has a message about email not yet
authenticated and the checkboxes are disabled.  But if you save the page it
refreshes and all the checkboxes are now unchecked.
Comment 1 Rob Church 2006-04-16 20:02:03 UTC
Under current SVN, when no email address has been provided, the email checkboxes
aren't even shown...unable to reproduce.
Comment 2 Alan Harder 2006-04-16 22:16:31 UTC
Just updated to rev 13679.. no change for me, still behaves as I described.

I see that line 479 of includes/SpecialPreferences.php is working fine in
checking for unset email, but in the else block it sets $disableEmailPrefs to
false at line 492.  Changing this to true makes those checkboxes grayed out
before you enter an email address, but saving other changes again saves all
those checkboxes as off.

Line 659 only checks $wgEnableEmail to decide whether to show that email box.. I
don't see any logic that would hide this completely when no email address has
been given.

svn info reports:
URL: http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3
is this not current?
Comment 3 Brion Vibber 2006-04-17 06:30:38 UTC
Disabled form controls don't sent their values with the form 
submission. This is equivalent to leaving the boxes unchecked 
from the perspective of looking at the incoming data.

To allow the values to persist while disabled, some logic would 
need to be added to avoid overwriting those values under the 
circumstances where they'd be disabled. A hackaround might be 
to send a hidden field as well, or to avoid trying to save over 
them when reading in data.
Comment 4 Alan Harder 2006-04-17 15:55:37 UTC
Created attachment 1560 [details]
Add hidden form inputs for checked+disabled checkboxes

Here is a patch to add hidden form inputs.
Comment 5 Alan Harder 2007-02-28 20:34:18 UTC
Just updated to rev 20087, still behaves as described above.
Comment 6 Alan Harder 2007-02-28 20:39:46 UTC
Created attachment 3282 [details]
Add hidden form inputs for checked+disabled checkboxes
Comment 7 Brion Vibber 2007-03-06 15:04:30 UTC
Can you explain what this change is for?

-                       $disableEmailPrefs = false;
+                       $disableEmailPrefs = true;
Comment 8 Alan Harder 2007-03-06 19:46:47 UTC
Created attachment 3303 [details]
Add hidden form inputs for checked+disabled checkboxes

That part of the diff was intended to disable the checkboxes when no email
address has been entered yet.  I see now this would also disable them when
$wgEmailAuthentication is false.. don't want that.  Adding new patch to fix
that and also disable the ccmeonemails checkbox when the others are disabled.
Comment 9 Chad H. 2009-09-22 19:49:51 UTC
+testme, CC'ing Andrew to see if this is still a problem with new prefs.
Comment 10 p858snake 2011-04-30 00:10:07 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 11 l.vaneijden 2011-08-18 14:38:29 UTC
In addition to the checkboxes under the user profile.

Where it shows the user his emailaddress (if using emailadres is enabled in the settings), the email from the user record is shown. 

However, if I change some preferences and press 'save', the emailaddress of the user is changed to an empty email (""). I don't see how any changes can be made to this without adjusting the core mediawiki files.

What I see is that when the 'save' button is pressed, $formData['emailaddress'] is checked. Since this is not present in the POST data, the variable will be NULL. The checks that follow are whether the variable is '' (which it is not) and whether the old emailaddress equals the new emailaddress (also not). It then defaults to set the new emailaddress, so the user his email is gone after pressing the 'save' button. 

This was in a mode where the emailaddress field is merely viewable and not editable.
Comment 12 John Du Hart 2011-09-01 03:19:46 UTC
Comment on attachment 3303 [details]
Add hidden form inputs for checked+disabled checkboxes

Thanks for submitting a patch to MediaWiki. Unfortunately I'm going to have to
mark this patch as obsolete because it no longer merges into our current code.

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


Navigation
Links