# Error when trying to create an event

**URL:** https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428
**Category:** Bug
**Tags:** events, fixed
**Created:** [June 16, 2026, 6:08pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428 "2026-06-16T18:08:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![newbit1337](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@newbit1337](https://meta.discourse.org/u/newbit1337)
#### Post date: [June 16, 2026, 6:08pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428/1 "2026-06-16T18:08:30Z")

</div>

When trying to create an event, I get the following error in my logs:  
`on(:post_created) handler error : ActiveRecord::RecordInvalid : Validation failed: An event accepts only group names.`  
 ![events_log](https://global.discourse-cdn.com/meta/optimized/4X/c/e/a/cea861ae55b62dc651f6ad7de0ad22fa85923a38_2_690x14.jpeg)

Creating the event:

 ![event_1](https://global.discourse-cdn.com/meta/original/4X/f/8/f/f8fd1e57123cb3609cb320bde0b49eb922920e85.jpeg)

Topic after thread creation:

 ![event_2](https://global.discourse-cdn.com/meta/original/4X/c/5/7/c572edbeefcb0cb4df7f255cd4e5b022f0a711ad.jpeg)

This happens to me, when I try to create an event via the “upcoming events” calendar, and also if I try it via normal topic creation.

I could not find anything about it, so I assume it’s a bug?  
Does anybody else have this problem?

Discourse version: 2026.6.0-latest

Thanks,  
newbit1337

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [June 17, 2026, 1:27pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428/2 "2026-06-17T13:27:18Z")

</div>

Very odd! I can’t seem to reproduce this error… that error message points to an invalid group, but I don’t see any groups in your BBCode and `status="public"` should allow everyone anyway…

Can you share the raw version of the broken post? You can find it by visiting `/raw/<topic_id>/<post_number>` (so for example, this Meta post would be `https://meta.discourse.org/raw/405428/1`

---

<div class="post-metadata">

### Author: ![newbit1337](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@newbit1337](https://meta.discourse.org/u/newbit1337)
#### Post date: [June 17, 2026, 5:38pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428/3 "2026-06-17T17:38:42Z")

</div>

Thanks for trying @awesomerobot 🫰 !  
The raw post data did not give me any clues, but I found more details in the log, so I fed them into an AI.  
The response was very helpful, and might be something for you to look into.

> **[Claude](https://claude.ai/share/8b99423b-9195-4176-b099-6a09186ebd35)**
>
> Shared via Claude, an AI assistant from Anthropic

I do have a user called “trust\_level\_0” for testing purposes and this might be an issue.  
After changing status to `status="standalone"` the event appeared. 🥳

 ![standalone-event](https://global.discourse-cdn.com/meta/original/4X/a/4/9/a4910d56d1475b5134fd6e08416fea958d892499.jpeg)

Thanks again, hope this helps!  
newbit1337

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [June 19, 2026, 12:04pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428/4 "2026-06-19T12:04:44Z")

</div>

> [@newbit1337](#):
>
> I do have a user called “trust\_level\_0” for testing purposes and this might be an issue.

hah yes, I think this is certainly the issue… thanks for mentioning that

it’s an edge case, but we can guard against it, I’ve just merged an update that will avoid the error in the future

> <https://github.com/discourse/discourse/pull/41039>
>
> Reported here: https://meta.discourse.org/t/error-when-trying-to-create-an-event…/405428
> 
> Creating a public event could fail with "Validation failed: An event accepts only group names" on sites that happen to have a user whose username exactly matches an automatic group name (e.g. \`trust\_level\_0\`)
> 
> This change excludes valid group names before checking for username collisions.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 26, 2026, 10:06pm UTC](https://meta.discourse.org/t/error-when-trying-to-create-an-event/405428/5 "2026-06-26T22:06:24Z")

</div>


