It seems silly to even be creating an issue for this, but I really am stumped. As far as I can tell, the auto-subscribe should be working but isn't. The documentation is a little sparse, so I'm not sure what to expect - but I haven't seen any errors.
If you can provide me with a starting point for my investigation it would be much appreciated.
Action: user joins a group which is linked to a mailman list with auto subscription enabled. (not via registration form).
Expected outcome: user is automatically subscribed.
Actual Outcome: user is not automatically subscribed.
Cheers,
Justin
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 591420-mailman_groups-8-D6.patch | 1.29 KB | colincalnan |
Comments
Comment #1
andy inman commentedHi Justin,
1. Does the user see a message: "Subscribing your email address [address] to Group Mailing List [list name]" when joining a group which has an auto-subscribe mailing list?
If so...
a. Is it only the auto-subscribe that isn't working, i.e. is manual subscribe/unsubscribe working?
b. Are you using User Mailman Register?
If not...
It would seem that the action of joining a group is not being trapped, or something else going wrong in the _mailman_groups_alter_og_confirm_subscribe function.
If you know PHP, take a look at lines 291-322 of the .module file and try adding some messages in there.
Comment #2
justin.hopkins commentedNetgenius:
Thanks for the reply. In answer to your questions:
1. No, the message does not appear when adding users to groups.
*even though the answer is no, I will still say that yes, I am using User Mailman Register, and subscriptions from that page DO work.
I added the following to the top of the _mailman_groups_alter_og_confirm_subscribe function:
watchdog('php', '_mailman_groups_alter_og_confirm_subscribe was called');This line was never executed. I am using Drupal 6.14, and OG 1.4. I have also tested OG 2.0, and it is still not working. From the looks of it, there is supposed to be a confirmation page after you add the users (?) - I'm not seeing that.
Comment #3
andy inman commentedOk, so it sounds like there's some fairly basic problem. The method used to trap the event of a user joining a group is less than ideal, as it's depdendent on undocumented OG internals. As I remember, I could not find a suitable documented hook in OG, but maybe there is one now. Also, I'll see if I can duplicate the problem you're seeing on my development system.
Comment #4
justin.hopkins commentedI noticed your @todo in the comments. I'd be happy to test any patches you may have.
Cheers!
Comment #5
anschauung commented@justin.hopkins: My patch at http://drupal.org/node/888570 tries to implement this. But, I haven't tested it with User Mailman Register.
Comment #6
anschauung commentedThis is fixed in the development branch as of 8/26/10
Comment #7
anschauung commentedComment #8
colincalnan commentedHey, I discovered two problems with this module.
1. It doesn't write anything to the database when you auto subscribe using the User Plus module, so it's impossible to properly unsubscribe individual users from lists.
2. It doesn't remove anything from the database when you disassociate lists from groups, so lists stay associated to groups.
I've created a patch that sorts out both issue, it's pretty straightforward. The first issue was with the unlink function. It was taking in two strings for list id and group id, and trying to pass them to the DELETE query. I converted them to integers and that worked perfectly.
The second issue was in regards to auto subscribing users via the User Plus module. The User Plus module allows you to manage group membership via one screen through a series of checkboxes. When joining and leaving to group I wanted to subscribe/unsubscribe users to the attached lists. Unless the user had already been added to the list manually, this was not working. I modified the _mailman_groups_alter_og_confirm_subscribe() function and ensured that it checked for if the user was subscribed before then updating their subscription, this worked a treat as the function that initially checks for subscription info, _mailman_manager_get_subscriptions(), also creates a blank subscription if one doesn't exist, and then next function call _mailman_manager_update_subscriptions() updates the subscription.
Comment #9
anschauung commentedThanks for writing this patch, @colincalnan -- I'll test this and see if we can't get it into the dev branch soon.