At the privatemsg 5.x - 3.0 module it shows some new messages at menu ("Inbox (xxx)") even though there's no unread messages in the Inbox. It does count of messages by the whole privatemsg table at line 2101:
function _privatemsg_get_new_messages($uid = 0) {
...
$cache[$uid] = (int)db_result(db_query('SELECT COUNT(*) FROM {privatemsg} WHERE recipient = %d AND newmsg = 1 AND recipient_del = 0', $uid));
...
}
but it looks for unread messages only for users that are exist at line 713:
function privatemsg_list($uid = NULL) {
...
$sql1 = "SELECT id, subject, p.timestamp, u.uid, u.name, newmsg, type FROM {privatemsg} p INNER JOIN {users} u ON ";
...
}
( INNER JOIN {users}
there ).
But if some users were deleted already, there are some unread messages from deleted users and these messages aren't shown at folders.
Can you fix this please?
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.