Needs work
Project:
Messaging
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Feb 2011 at 10:57 UTC
Updated:
9 Jan 2014 at 19:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pandroid commentedSorry, the line is from messaging.mail.inc
Comment #2
drummI've determined this is the cause for a bug with groups.drupal.org, #1379362: Emails coming from Anonymous
It appears not a problem on the 4.x branch. It would be good to get this on 2.x since it is the only one with a recommended release.
Attached is a patch which bypasses the whole token system since there is not a user account, or the user account should not be used.
Comment #3
gregglesBetter status and subscribe.
Comment #4
greggles#2 is Now deployed on g.d.o and working there. Setting to rtbc since it fixes the bug I care about, but it could be this isn't the "right" way to fix it.
Comment #5
nevosa commentedI applied the patch, and it resolved sender the issue.
Thank you.
Comment #6
gregglesWhat is blocking this patch?
Tagging, as well.
Comment #7
danepowell commentedI am experiencing the same problem, but in a slightly different use-case, and #2 didn't work because it didn't address the root cause.
I am using Mailhandler (like the OP) to post nodes, and notifications get sent out when nodes are posted. Mailhandler 6.x-1.x worked fine, but I started getting this error with Mailhandler 6.x-2.x. Here's why:
Mailhandler 6.x-1.x would 'forge' the global $user on import to be the message sender. Then when notifications_event() was called, it would insert $user->uid into the event.
Mailhandler 6.x-2.x no longer forges the global $user, so notifications events get created with the anonymous user account.
The solution is to patch notifications_content to explicitly add a uid to the event before calling notifications_event().
I think this is a more correct patch than #2, but I have no idea if it will solve everyone else's problems...
Comment #8
gandhiano commentedNone of the patches above worked for me.
Comment #9
msielskiPatch #7 worked for me. Thanks for the fix. I agree this seems like the correct place to patch.
Comment #10
drummI'm not actively working on this issue.