Maintainer News checkbox (which is req. & mandatory) unsubscribes itself upon submit
| Project: | Drupal.org customizations |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Gábor Hojtsy |
| Status: | needs work |
I hope this is the correct place to raise the following.
I just went into my account on the new Drupal 6 version of drupal.org and edited my account settings.
I checked my newsletter settings at user/{uid}/edit/newsletter, did not alter anything there, but noted that as a holder of a CVS account I am subscribed to Maintainer News and cannot manually unsubscribe from that. Fair enough. I need to stay subscribed.
But when I hit save (without altering anything on that page), I get the message "{my email address} unsubscribed from Maintainer news ".
Maybe just an erroneous error message or maybe an error of process. Not sure if I am now subscribed or unsubscribed. When I refresh me newsletter settings page, I find the Maintainer News checkbox greyed-out (as before) with no selection apparent.

#1
If the box is unchecked, that's bad - the disabling of that checkbox is done by the drupalorg module, so maybe the issue is with it?
#2
Yes; the box was unchecked but disabled as I came into the screen, and unchecked and disabled after I saved the screen.
I do not know if the error message appeared in Drupal 5.
#3
Unchecked but disabled vs. unchecked and disabled is not much of a difference. Please correct, so we know what have you seen exactly :)
#4
Also, this might be related to disabled checkboxes not returning their value properly, see: #314286: Back-port disabled checkboxes fix from 7.x
#5
The box was unchecked and greyed out (disabled), as I came into the screen and its state was exactly the same after I saved the screen.
The attached screenshot shows the state of the check-box both before and after the save.
Please let me know if my explanation still contains any ambiguities :-)
#6
Well, from the original description it looks like you've first seen the checked checkbox and then was unsubscribed:
#7
BTW I can reproduce that. Looks like it is indeed that formapi bug exposed. So we should get #314286: Back-port disabled checkboxes fix from 7.x fixed for Drupal 6 (nobody replied to my concern/question there) and deploy it on drupal.org. Then restore all maintainer subscriptions based on the cvs user data. I'd be happy to do all this if I'd get the feedback requested on the core bug.
Retitled and assigned this issue for what we know now. Need to fix #314286: Back-port disabled checkboxes fix from 7.x first.
#8
JDSaward wrote:
I've just run across this bug in a slightly different manner, but the end result is the same, and it looks to be the same bug. Here's what I did:
I arrived on the My Newsletters in order to unsubscribe myself from the Security Announcements newsletter, since I now have a nifty set of RSS feeds in my EventBox app, (thanks to the Team for those!) and after unchecking the box, I submitted the form. I was shown two drupal_set_messages on the subesquent page instead of the one i was expecting, and upon closer examination I had been automatically unsubscribed from the CVS Maintainer News checkbox also. Woops!
There's no way to re-subscribe now, cause the Maintainer News checkbox is greyed out, as mentioned in the original issue description. I bring this to light again as a critical issue cause I suspect more and more people will end up unsubscribing from the Sec List as I have done.
#9
Since my screenie's img tag is not showing in the previous comment, even though I had full html turned on, I'm attaching a screenie of the problem, just in case it helps.
[Edited by KiamLaLuno to correct the URL of the image]
#10
This bug has been patched and committed in Issue #314286: Back-port disabled checkboxes fix from 7.x. The issue was that "disabled checkboxes, even where they are checked, are not sent by the browser (by spec). We need to special case the disabled case so as to provide the correct value to form handlers."
Now, we're just waiting for it to get pushed out to d.o in the next D6 release. Cheers all!
#11
#12
After that is pushed out, we need to resync all subscriptions based on the CVS account holder list as well.
#13
The D6 bugfix backport was committed to CVS in Feb, but this is still happening (to me, today), so either:
* d.o is not using an up to date version still (and it really should if possible, since security fixes)
* the disabled form field is not setting a sensible default value
* there are still bugs with the process
form_type_checkbox_value returns the default value if the field is disabled, which seems correct off-hand but it could still be buggy in other places. In either case, disabled fields should not ever even consider user input but rather be determined programmatically (and most of the time this means just not changing the value in the variables table).
#14
Unfortunately we did not manage to get to resetting the maintainer data, so those, who were unsubscribed due to the previous issue are still not subscribed. I'll try to make sure to get to that this week. Also, we did not send any maintainer newsletters recently. You can also track these on the forums: http://drupal.org/forum/118
#15
Thanks for the link, Gabor. My main worry is that the bug still exists on live d.o though (and thus people are still being unsubscribed, like I was yesterday).
#16
The update status report on drupal.org says we are running 6.12 (as expected), so if this bug is still there, then we face some other issue here.
#17
I just tried it, and the problem is still there.
I visited "My newsletters" page, and the last checkbox was selected, and disabled; I clicked on the save button, and I got the message that was saying me I was unsubscribed from that newsletter. I also tried revisiting my edit page after I visited another page, but the last checkbox was disabled, and not selected.
#18
Still a problem. Had the same issue today. (You can see my description at #528492: Unsubscribed from maintainer news).
#19
drupalorg.module on d.o is now running the latest from DRUPAL-6--1 branch. Not sure what else is going on in here, but certainly there's nothing pending deployment at this point...
#20
It seems that the problem is now with who has been removed from the developers newsletter; the code seems to enable the checkbox only when the CVS account is approved, and disable it when the status of the CVS account is changed from approved.
#21
I've run this query on the database:
select count(*) from users_roles where rid = 8;(8 is the role for CVS maintainers) and got 2296. The maintainer newsletter has over 6300 members, so something is not right with my logic of who should be on there or with the code to maintain that newsletter.#22
The only way I found to subscribe again to the maintainers newsletter was to go to the CVS account page, and click on the save button; doing so, I have been reported to be subscribed to the newsletter one again.
I am not sure if that would work for all users; maybe it worked for me just because I am a CVS maintainer (versus a CVS user), and I can see the form fields to approve the CVS accounts.
#23
What I wrote before is clearly a workaround, as there is effectively a bug that needs to be resolved.
I tried the trick with JDSaward, Senpai, and kwinters; it seems to work (or that, or the checkbox is selected without to really subscribe the user to the newsletter).
#24
Is there a way to verify if I am really subscribed to the maintainers newsletter? And JDSaward, or Senpai, or kwinters?
My user ID is 55077.
#25
Kiam: you go to the newsletters page and see the checkbox checked. Unsurprisingly :)
#26
Well; as the checkbox was unchecked before, I would say it is suprising, in some way. :-)
It doesn't surprise me that when approving a CVS account, the user gets subscribed to the newsletter.
The question is if the users have been really subscribed to the newsletter, or it is just a checkbox that appears checked.
#27
I think the problem has more to do with the forms API or that specific form than anything. In particular I suspect that inactive checkboxes are simply not making it to the form result at all (not POST'd and not pulled from the stored data), and in this case what we really want is some markup (to let you know you're subscribed) and a "value" field because we don't want javascript to be able to change the inactive state.