I was bashing my head trying to get this module to work and discovered the portion that was causing it to fail to subscribe (you would submit and just hit a blank page).
// if (count($arrprofile) > 0 && module_exists('profile')) {
// profile_load_profile($account);
// foreach ($arrprofile as $name) {
// if ($account->$name) {
// $item = $account->$name;
// }
// else {
// $item = $edit[$name];
// }
// if ($item) {
// $mailname .= $item ." ";
// }
// }
// $mailname=rtrim($mailname);
// }
With this commented out its up and running as expected, I dont have the time to 'shoot it at the moment as this sites timeframe is insane, just happy its working for now. When I have some time in a week or so I'll revisit this and debug some more. I'm happy to answer any questions in the meantime.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | user_mailman_register_emptyprofile2.patch | 2.33 KB | samuelet |
| #5 | user_mailman_register_emptyprofile.patch | 988 bytes | samuelet |
Comments
Comment #1
samuelet commentedThanks for bug reporting.
That portion of code is related to the profile module and its user mailman register setting.
As you said, it only affects the mail realname of the user in mailman.
I need some information because i can't reproduce it:
What's your drupal release? What modules are enabled (mainly those related to profile managment)?
What's the User Mailman register profile settings?
If you can, it'd be useful also to check for apache logs.
Comment #2
Blitter commentedDrupal 5.1
Stock Profile
"Profile module:
Retrieve the display name of mail address from this Profile module field. Multiple fields have to be comma separated. Optional"
Is empty
Comment #3
samuelet commentedIt's strange. The code you have commented is executed only when the module profile setting is not empty.
If you have time, a good testing is to add this line:
and check if the variable value is outputed in the page.
Comment #4
Blitter commentedYour code addition returned:
array(1) { [0]=> string(0) "" }
Error log:
Cannot access empty property in user_mailman_register.module on line 190
Comment #5
samuelet commentedOk, now the problem is clear to me.
Could you try if this patch solve?
Comment #6
samuelet commentedA better patch to test.
With this, you can empty the profile setting if it was previously configured.
Comment #7
Blitter commentedFixed,
I've tested it with profile fields for the name and without, both function as expected.
Comment #8
samuelet commentedComment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.