Comments

mike82 created an issue. See original summary.

mike82’s picture

In PrivateMessageMapper.php this change could do the job:

public function getUnreadThreadCount($uid) {
    return $this->database->query(
      'SELECT COUNT(thread.id) FROM {private_message_threads} AS thread JOIN ' .
      '{private_message_thread__members} AS member ' .
      'ON member.entity_id = thread.id AND member.members_target_id = :uid ' .
      'JOIN {private_message_thread__last_access}_time AS last_access ' .
      'ON last_access.entity_id = thread.id ' .
      'JOIN {pm_thread_access_time} as access_time ' .
      'ON access_time.id = last_access.last_access_time_target_id AND access_time.owner = :uid AND access_time.access_time < thread.updated
      [
        ':uid' => $uid,
      ]
    )->fetchField();
  }
zenimagine’s picture

@mike82 I am happy to have found this question. I searched for 2 days from where this problem came from.

I created a view of "Private Message Thread" with the path /inbox

When I click on an unread thread, it goes for example on the path /private_messages/2

And in the notification block, the message remains counted as unread.

As you say in your question, the only way to mark the message as read and go to the url /private_messages

Do you have a patch please ?

zenimagine’s picture

Priority: Normal » Major
zenimagine’s picture

It's missing ' in your code

zenimagine’s picture

@mike82 Have you found a solution to this problem?

zenimagine’s picture

Version: 8.x-2.0-beta15 » 8.x-2.x-dev
zenimagine’s picture

@mike82 I have exactly the same problem. Do you have a patch to correct the problem ?

zenimagine’s picture

Status: Active » Needs work
johnsicili’s picture

nour eldin essam’s picture

StatusFileSize
new1020 bytes

For me it was fixed after I Send a new Message

nour eldin essam’s picture

Issue summary: View changes
Issue tags: +#11

For me it was fixed after I send a new message

cherouque’s picture

StatusFileSize
new1.03 KB

#11

cherouque’s picture

Issue tags: -#11
StatusFileSize
new1.03 KB

#14

cherouque’s picture

StatusFileSize
new1.03 KB

#15

For me it was fixed after I send a new message

cherouque’s picture

Issue tags: +#14

#15

ravi.shankar’s picture

Status: Needs work » Needs review
avpaderno’s picture

Issue tags: -#14
anmolgoyal74’s picture

Status: Needs review » Closed (outdated)

This issue has already been fixed.