Group inboxes and archives are visible even when empty

AI-generated summary

Users report that group inboxes and archives remain visible in the sidebar and messaging area even when empty, despite having no messages and ‘who can message this group’ set to ‘Nobody’. alehandrof initially describes the issue, and Heliosurge suggests it may be a bug. tobiaseigen confirms the behavior and suspects a bug related to deleted messages, noting that the inbox persists even after message deletion. Moin suggests running the database consistency job, which resolves the issue for tobiaseigen. However, alehandrof confirms the problem persists despite this. Moin identifies a specific scenario where a group inbox remains visible: when a message sent to the group is later converted into a public topic, even if the inbox is empty. This case is confirmed by tobiaseigen, who notes that a data explorer query returns the topic in such cases, indicating the issue may stem from how deleted messages and public topics are handled in group inboxes.

Hello folks,

We have a number of old groups at our site which don’t have any messages in their inbox or archive, but they’re still visible in the sidebar and at /my/messages.

I found this old topic, but it doesn’t provide a solution that works for me: Messaging: Group inboxes and archives show even after all messages deleted

Any other ideas?

3 Likes

These old groups.. I am wondering if you edit group and change

“who can message this group?” To Nobody?

Or do these old groups still require to have a group mail box?

1 Like

I apologize for not responding sooner, but all the groups have “who can messages this group” set to “Nobody”.

Anything else I can check?

1 Like

That definitely sounds like a bug. If set to nobody the group mailbox imho should not be visible.

I imagine a workaround fix could be to use the Customization > Theme component to add groups as classes and then use each group class to display none on group mailboxes that are set to nobody. I say to use group classes as I imagine if you use CSS to hide them in general it might also hide the moderators group mail box.

Did those old groups previously have messages in them? I have a group on my personal site that just had one message in it and the inbox appears in the sidebar. I just deleted the message and the group inbox is still showing.

The deleted message no longer shows up in the inboxes, even to me as admin. I was able to browse back to it in my browser history and see it still exists as a deleted message. I tried removing the group and it did not let me. I undeleted it and removed the group. Then deleted the message for good measure.

The inbox is still showing - so I suspect there is still some other deleted message in that group inbox.

So yes, there is some bug here, methinks - if the only messages in a group inbox are deleted then the group inbox should not appear in the sidebar.

The only fix at the moment methinks is to delete the group and recreate it.

It would be interesting to use data explorer to get the post id of any deleted messages in a group inbox to confirm my theory, and get a look at those posts.

2 Likes

Did you trigger the database consistency job afterwards? I think once that has run the inbox no longer shows up

2 Likes

Good call! That worked for me.

Edit: the linked topic in the op helps me. Wonder what’s going on for you @alehandrof.. did the problem eventually go away?

1 Like

I ran the database consistency job, but the inboxes are still there. I’m an admin user on the site if that makes any difference. But they should disappear as they are empty – latest, new, unread, archive all have no messages.

I’m stumped :frowning:

2 Likes

Does this data explorer query return any topics?

-- [params]
-- group_id :inboxgroup

SELECT tg.topic_id, t.id AS topic_exists, t.deleted_at
FROM topic_allowed_groups tg
LEFT JOIN topics t ON t.id = tg.topic_id
WHERE tg.group_id = :inboxgroup
  AND (
    t.deleted_at IS NULL
    OR t.id IS NULL
  )

1 Like

In my case it does not. :+1:

1 Like

It should only display topics if the inbox is shown.

I have already found a way for this to happen even though the inbox is empty:
After a message which was sent to that group is turned into a public topic.

So:

  1. Create a new group
  2. Allow at least admins to message the group
  3. Add a member to the group to check whether the inbox is shown
  4. Send a message to the group
  5. Use the “make public topic” option in the admin wrench menu
  6. The inbox is empty but even after the database consistency job ran the inbox does not disappear

And in this case the data explorer query above returns that topic

2 Likes