# לא ניתן ליצור אירועים ציבוריים על ידי משתמשים שאינם רואים את קבוצת TL0

**URL:** https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946
**Category:** Bug
**Tags:** events
**Created:** [24 בספטמבר,‏ 2023,‏ 10:25pm UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946 "2023-09-24T22:25:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [24 בספטמבר,‏ 2023,‏ 10:25pm UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/1 "2023-09-24T22:25:07Z")

</div>

I also have a user who cannot create an event, they get the error “An error occured: Invalid allowed groups.” and the allowed group in the event is the default `trust_level_0`, she is in an allowed group in the site setting `discourse post event allowed on groups`, any ideas?

 ![imagen](https://global.discourse-cdn.com/meta/original/4X/9/b/9/9b930ef284aba21e0e5b60188bca23718c83e248.jpeg)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [24 בספטמבר,‏ 2023,‏ 11:30pm UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/2 "2023-09-24T23:30:07Z")

</div>

> [@davidkingham](#):
>
> they get the error “An error occured: Invalid allowed groups.” and the allowed group in the event is the default `trust_level_0`,

I think the problem is that the `trust_level_0` group on your site cannot be _seen_ by the user, even though see is a member of it. To confirm that, can you check the Interaction tab of your site’s `trust_level_0` group’s management page?

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

My guess is that the value of the “Who can see this group” setting will be either “Group owners and moderators” or “Group owners.” I think the plugin’s code makes the assumption that the `trust_level_0` group will always be configured so that it can be seen by “Everyone.”

If this is correct, you could fix the issue for now by changing the group’s visibility setting back to its default value of “Everyone.”

This might be considered to be a bug in the plugin. When a public event is created, the code that’s used to create the event looks something like this:

```plaintext
[event start="2023-10-05 16:00" status="public" timezone="America/Vancouver" end="2023-10-05 17:00" allowedGroups="trust_level_0"]
[/event]

```

Note that the value of `allowedGroups` is automatically set to `trust_level_0` for public events. It is possible for users to be members of the TL0 group but not be able to “see” it. In this case, these users will not be able to create public events.

For reference, the relevant code is here: [discourse-calendar/lib/discourse\_post\_event/event\_validator.rb at main · discourse/discourse-calendar · GitHub](https://github.com/discourse/discourse-calendar/blob/main/lib/discourse_post_event/event_validator.rb#L149-L154)

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [25 בספטמבר,‏ 2023,‏ 12:40am UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/3 "2023-09-25T00:40:33Z")

</div>

That was the problem, thank you Simon!

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [25 בספטמבר,‏ 2023,‏ 12:48am UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/4 "2023-09-25T00:48:28Z")

</div>

I’m moving this to the bug category for now to make it easier to track. If preventing users who can’t see the TL0 group from creating public events is the intended behavior, this could be recategorized to #Contribute > UX.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [25 בספטמבר,‏ 2023,‏ 1:30pm UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/5 "2023-09-25T13:30:23Z")

</div>

That was great deduction…  
Some error messages could bring more details depending on the context so we can find more easily where the issue comes from.

---

<div class="post-metadata">

### Author: ![srosset81](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/srosset81/32/460406_2.png) [@srosset81](https://meta.discourse.org/u/srosset81)
#### Post date: [13 בנובמבר,‏ 2024,‏ 10:19am UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/6 "2024-11-13T10:19:18Z")

</div>

FYI I got a similar error message, but it is due to using a non-English language. I started a new topic here: [Calendar plugin needs group visibility](https://meta.discourse.org/t/calendar-plugin-cannot-be-used-with-languages-other-than-english/335927)
