# Non-staff users are missing link to Messages in UI

**URL:** https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109
**Category:** Bug
**Tags:** sidebar
**Created:** [October 6, 2022, 9:16am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109 "2022-10-06T09:16:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 6, 2022, 9:16am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/1 "2022-10-06T09:16:01Z")

</div>

I have a test-TL1 user I use to test things or permissions etc. But today I noticed “Messages” is not available for this user.

I can send a message, or open it from notifications, or via direct URL but, there is no messages URL in:

- my profile
- in the new sidebar
- in the notification menu subtab “messages” is not visible

Does anyone have any idea how I can fix this?

The user has TL1, which should give PM access.

Example: there should be “Messages” here on my profile page:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/b/a/5ba8f205817a7ab0517833c1ce20f4f8c5aac110.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 6, 2022, 10:14am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/2 "2022-10-06T10:14:54Z")

</div>

I think I can confirm this. I’ll slide it over to #Contribute > Bug. 👍

- `personal message enabled groups` set to `trust_level_1`
- TL1/2/3 user can send and access PMs, does not have Messages tab in user menu or user area

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/3/8/f38993cf3333a981ae2c06799c741b4bb6db03ba.png)

~~I’m seeing it here on Meta too:~~

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 6, 2022, 10:21am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/3 "2022-10-06T10:21:42Z")

</div>

Hmm thanks for confirming. On Meta, I am TL3 but the messages tab is visible for me.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 6, 2022, 10:28am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/4 "2022-10-06T10:28:39Z")

</div>

Actually, I fluffed the Meta test… 🙂 I had previously downgraded my test user to TL0 and forgotten about him. Bumping them to TL1 made the Message tab appear. Though that may help me work out why the same is not happening on my test site.

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 6, 2022, 10:31am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/5 "2022-10-06T10:31:18Z")

</div>

I tried that before, changing from TL1 to TL0, back to TL1, even TL3 and none of it made a difference.

Also safe-mode does not fix the issue for me.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 6, 2022, 10:54am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/6 "2022-10-06T10:54:43Z")

</div>

It seems to be hidden on my test site for non-staff users. Bumping my test user to anything less than Mod does not make it appear. Though not an issue here on Meta. 🤔

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 7, 2022, 4:44am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/7 "2022-10-07T04:44:47Z")

</div>

I just updated another instance, then logged into a TL1 user, and messages disappeared from the menus and profile. I’m not using the new/experimental sidebar/notif menu here.

> [@JammyDodger](#):
>
> It seems to be hidden on my test site for non-staff users. Bumping my test user to anything less than Mod does not make it appear.

That’s exactly what I experience on two instances.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 9, 2022, 8:22am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/8 "2022-10-09T08:22:30Z")

</div>

I’ve updated my test site this morning to have another run at this and I’m no longer seeing this issue. The message tabs are now showing up where they’re supposed to for non-staff users. I don’t know if this is a consequence of a fresh update (I can’t see any relevant commits) or possibly a setting I’ve changed/something I’ve done during other issue-testing. 🤔

To rule it out, could you update to latest and see if that helps?

(FWIW I also span up a new test site while exploring something else, and the new TL1 test user on there also had the messages tabs displayed in the correct places)

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 10, 2022, 7:43am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/9 "2022-10-10T07:43:41Z")

</div>

> [@JammyDodger](#):
>
> To rule it out, could you update to latest and see if that helps?

I did two rebuilds in the last 24 hours and the issue is not solved so far. Strange.. Wonder what can be the cause. [Safe mode](https://meta.discourse.org/t/53504?silent=true) doesn’t solve it either..

I noticed `Allow other users to send me personal messages and chat direct messages` is also not available on the profile preferences page for the TL1 user.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 10, 2022, 7:54am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/10 "2022-10-10T07:54:13Z")

</div>

I was doing some run-throughs with the new `direct message enabled groups` (as well as the existing `chat allowed groups`) plugin settings during the window when the tabs weren’t there and then were there. There’s a small chance that changing and resetting those may be the trigger?

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 10, 2022, 8:00am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/11 "2022-10-10T08:00:51Z")

</div>

I have just tried with these chat settings, I already did some testing with other settings earlier to see if there was a bug with those. So maybe I have some old setting that’s still enabled? Not sure..

EDIT: Setting `min trust to send messages` to `0: new user` does make messages appear, even tho I bumped the user to TL1.

* * *

EDIT2: So to conclude after the latest finding, with the setup as seen below, no one except admins/mods can see messages. If I set `min trust to send messages` to `0: new user` everyone including TL0 sees the message section. Same behavior on two instances.

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/3/1/c31b5a33034858cfc6c97b4ccfe43ea6336d1826.png)

`personal message enabled groups` has **some** effect, on a user page the message button gets removed if user doesn’t have the required TL. But messages tabs only show when `min trust to send messages` is set to `0: new user`

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [October 10, 2022, 10:09pm UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/12 "2022-10-10T22:09:54Z")

</div>

I updated our Discourse instance to 2.9.0.beta10 but didn’t turn the new sidebar feature on. Our users have noticed that the Personal Message icon has since disappeared  
in the menu bar when clicking the upper-right hand avatar, although as admin I can still see mine. Was the icon removed due to the new sidebar menu launch? Any way to get it back? Thank you!

Admin menu bar:

 ![admin bar](https://global.discourse-cdn.com/meta/original/4X/d/8/3/d83a208a5e3a2366f9d1ef41ba73c5bd5989b160.png)

Regular user menu bar:

 ![user bar](https://global.discourse-cdn.com/meta/original/4X/1/f/0/1f05e8cb1a450bed2cce56b8bc9d443aa117b132.png)

Thank you!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 10, 2022, 10:27pm UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/13 "2022-10-10T22:27:12Z")

</div>

I’ve slipped your post over to this topic as it sounds like the same issue. 👍

I’m hoping a second report should make this easier to pin down now I accidentally fixed mine without working out how. 🙂

Could you try changing `min trust to send messages` to TL0 and back to TL1 again to see if resetting that helps?

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 10, 2022, 10:32pm UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/15 "2022-10-10T22:32:29Z")

</div>

> [@JammyDodger](#):
>
> Could you try changing `min trust to send messages` to TL0 and back to TL1 again to see if resetting that helps?

Nope, that does not help.

What is noticeable: if you set the above-mentioned setting to TL0, save and refresh the page, this is what It looks like:

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/e/2/be22098228f2ae3acff4bd5d7ac0a9ed5416bde1.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 10, 2022, 10:38pm UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/16 "2022-10-10T22:38:21Z")

</div>

I’ve noticed that on mine too. I think it still records something in the staff logs about the setting change, but linked to the `personal_message_allowed_groups`. I’ll have to dig a little deeper into that tomorrow, but that may be somewhere to look to see if I can track what I did.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [October 10, 2022, 11:52pm UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/19 "2022-10-10T23:52:43Z")

</div>

I’m taking a look at this since I added the `personal_messages_enabled_groups` setting. This behaviour is unexpected:

> [@MarcP](#):
>
> What is noticeable: if you set the above-mentioned setting to TL0, save and refresh the page, this is what It looks like:

It looks like what is happening is that changing the `enable_personal_messages` and `min_trust_to_send_messages` settings in the UI also change the `personal_message_enabled_groups` setting. If I uncheck `enable_personal_messages` and save it, it clears out `personal_message_enabled_groups`, which reproduces the behaviour shown above. Or if I set the `min_trust_level_to_send_messages` to TL1, it sets `personal_message_enabled_groups` to admins.

I will open a PR today to hide the old settings in the UI, and also fix up this part of SiteSettingsController that unconditionally sets the new setting’s value to what we are changing the old setting to, even if `override` is not set to `true`:

> <https://github.com/discourse/discourse/blob/dc89b72d465329b041b0b26be4e6176343288176/app/controllers/admin/site_settings_controller.rb#L21-L24>

> <https://github.com/discourse/discourse/blob/dc89b72d465329b041b0b26be4e6176343288176/lib/site_settings/deprecated_settings.rb#L10-L11>

Will hide the old settings first to stop the bleeding. Make sure you set `personal_message_enabled_groups` to what you want and leave the other settings as is, and let me know if that’s still not fixing the issue.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [October 11, 2022, 12:15am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/20 "2022-10-11T00:15:22Z")

</div>

Just merged the PR to hide the old settings:

[https://github.com/discourse/discourse/pull/18535](https://github.com/discourse/discourse/pull/18535)

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 11, 2022, 12:32am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/21 "2022-10-11T00:32:32Z")

</div>

Thanks, just did a rebuild and I’m still one commit behind, not showing there’s an update available on /admin/upgrade too. Will try again tomorrow. Thanks again and good night for now!

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [October 11, 2022, 3:15am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/22 "2022-10-11T03:15:56Z")

</div>

I just merged another fix earlier so this shouldn’t happen for other deprecated settings which have not been hidden in the UI [FIX: Deprecated settings should not override from UI by martin-brennan · Pull Request #18536 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/18536)

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 11, 2022, 9:40am UTC](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109/23 "2022-10-11T09:40:21Z")

</div>

It looks like the old settings are removed, but still all TL groups are ignored and users only have Messages access if the new setting is set to “everyone”.

[Next page](https://meta.discourse.org/t/non-staff-users-are-missing-link-to-messages-in-ui/241109.md?page=2)
