# TypeError when submitting a flag with custom content (require\_message flags)

**URL:** https://meta.discourse.org/t/typeerror-when-submitting-a-flag-with-custom-content-require-message-flags/403133
**Category:** Bug
**Tags:** fixed
**Created:** [May 16, 2026, 2:45am UTC](https://meta.discourse.org/t/typeerror-when-submitting-a-flag-with-custom-content-require-message-flags/403133 "2026-05-16T02:45:08Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [May 19, 2026, 6:04am UTC](https://meta.discourse.org/t/typeerror-when-submitting-a-flag-with-custom-content-require-message-flags/403133/5 "2026-05-19T06:04:45Z")

</div>

> [@cuo\_wu](#):
>
> For `require_message: true` flags (which are all `notify_type: true`), `post_can_act?` sets `can_act: false` when `already_did_flagging` is true — i.e. the user has previously submitted any notify-type flag on that post. In that case the entry is absent from `actions_summary`, `postActionFor` returns `undefined`, and the crash follows.

I think flagging the topic once won’t cause this because then `already_did_flagging` should be `false`. Usually flagging the same post again is not possible. But after flagging as “something else” you can still flag as “illegal”. The result in this case is

 ![Screenshot_20260519_074906_Firefox](https://global.discourse-cdn.com/meta/original/4X/3/1/8/318fd455f77ab9d61189b91a051e8cd99c3dd38a.jpeg)

---

_[View the full topic](https://meta.discourse.org/t/typeerror-when-submitting-a-flag-with-custom-content-require-message-flags/403133)._
