# "Save Invite" button not working "is not a function" error \[cache issue\]

**URL:** https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660
**Category:** Support
**Tags:** invites
**Created:** [February 8, 2024, 9:21am UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660 "2024-02-08T09:21:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![gassim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gassim/32/220910_2.png) [@gassim](https://meta.discourse.org/u/gassim)
#### Post date: [February 8, 2024, 9:21am UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/1 "2024-02-08T09:21:15Z")

</div>

Hi

When I click on the ‘save invite’ after filling in the information for the invitation, nothing happens, and in the console (DevTools) it shows an error “this.invite.save is not a function.” I believe this is a bug, could you please confirm that it will be fixed?

see screenshot:

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/b/b/7bbfea5282021a1d3f498f898ace7a378550d61c.jpeg)

For anyone facing the same issue, you can temporarily create invitation links using the Discourse API:

```plaintext
var myHeaders = new Headers();
myHeaders.append("Api-Username", "Gassim");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("api-key", "amazingseceretAPIkey");

var raw = JSON.stringify({
  "max_redemptions_allowed": 1000000,
  "topic_id": 56955,
  "group_names": "AMAZINGGROUP",
  "expires_at": "2024-02-08T12:00:00.000Z"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("domain/invites.json", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

```

Thanks!

---

<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: [February 8, 2024, 9:22am UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/2 "2024-02-08T09:22:36Z")

</div>

Just to check, have you updated your site to the latest version?

---

<div class="post-metadata">

### Author: ![gassim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gassim/32/220910_2.png) [@gassim](https://meta.discourse.org/u/gassim)
#### Post date: [February 8, 2024, 9:23am UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/3 "2024-02-08T09:23:28Z")

</div>

Yes, please see screenshot below:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/3/8/8385d72aaddf37b5bc3c653f327a91f1e57db8e7.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: [February 8, 2024, 10:41am UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/4 "2024-02-08T10:41:35Z")

</div>

Judging by the number in blue, it looks like you last updated about a week ago?  
Could you update to latest from your `/upgrade` page and see if the problem persists?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 8, 2024, 2:57pm UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/5 "2024-02-08T14:57:39Z")

</div>

That’s odd. I can’t reproduce it from his version. Hopefully, upgrading will fix the issue.

---

<div class="post-metadata">

### Author: ![gassim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gassim/32/220910_2.png) [@gassim](https://meta.discourse.org/u/gassim)
#### Post date: [February 8, 2024, 3:17pm UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/6 "2024-02-08T15:17:24Z")

</div>

Hi!

Thanks for the tip. Updating did not resolve the issue so I cleared all site data from the browser, logged out, and then logged back in so when I tried to create an invite again, it worked.

Sorry for not checking the cache first, and thanks for the help!

---

<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: [March 9, 2024, 3:18pm UTC](https://meta.discourse.org/t/save-invite-button-not-working-is-not-a-function-error-cache-issue/294660/7 "2024-03-09T15:18:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
