Hello,
I got complaints from a couple folks that they had notifications of a private message (not email notification - just the kind that is persistent that says "you have (2) new messages") but when they click the link, there is nothing there. This happened to me, as well: when I clicked a message that was in my inbox and deleted it, it upped my number of private messages from 1 to 2, instead of zero.
I don't know if the same thing that happened to me is what happened to my user, though.
Comments
Comment #1
naheemsays commentedThe drupal 5 version of privatemsg is almost unsupported apart from end users helping themselves and others - it is recommended to move to drupal 6 as soon as you can do so.
I do not think the drupal 5 version of privatemsg marks deleted messages as read so the error may be from there (or it ay not, you will need to investigate this further. Maybe have a test install where you can try different things?).
Apart from that, you will need to try and find out exactly why it is happening, maybe have a look at the code too.
Comment #2
litwol commentedSorry. d5 is a wont fix. please upgrade to d6 version if you wish to receive support.
Comment #3
tevih commentedyou serious?? On the front page it says "The Drupal 5 version of Privatemsg is in bug fix mode, no further features will be added."
Do you not consider this a bug? Can you provide any sort of direction whatsoever on what I can do to fix this?
Comment #4
litwol commentedYou need to provide very detailed steps on how to reproduce this problem.
Comment #5
tevih commentedThank you, that's at least a fair response. Still not sure what is causing it though. I'll come back when I've figured out more.
thanks again
Comment #6
litwol commentedYou could take a look in your watchdog entries, though that doesn't guarantee that anything useful will be there. you can also take a look at your php error logs, same deal though.
Comment #7
naheemsays commentedIt would be easiest to have a look in the database directly to see how many unread messages there are, and then move onto the UI to see why they differ.
Comment #8
tevih commentedThanks - I peeked into the database and did some other poking around. I figured out what caused the phantom messages, (and solved it for myself) but I'm not sure what should be done about it. Let me explain:
- There seem to be 3 modules that were causing this.
- I have User Relationship module automatically adding myself as a friend to any new user who signs up.
- The User Relationships module did not have a "sender" specified in the notification that is sent to the friend requestee and friend requester
- So it defaulted to user of UID "0" (non existent - anonymous) in the from field
- Anonymous users lack privelages to send private messages (set in access control)
- The message was automatically sent, anyway, but never delivered.
- recipients of the UR notifications got the private message "new messages indicator" but couldn't see the messages
putting my username in the "from" field for automatically generated notifications resolved this.
I don't know if the issue is that the UR module should not have been able to send notifcations (bec anonymous lacked the permissions) or if the private message module should not have had the new messages indicator. Or, if the PrivateMsg module should have simply delivered the messages anyway, (1) since it was automatically generated and (2) since it had the new messages indicator.
Might this also be an issue with Drupal 6, too?
What do you think?
Comment #9
berdir> Might this also be an issue with Drupal 6, too?
No. If our API is used, all messages are properly validated before they are sent.
Also, while the D5-3.x codebase *is* ugly and bad, as this example proves, the actual bug is in the user relationships module, I'd say...