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

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:

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

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!

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

1 Like

Yes, please see screenshot below:

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?

1 Like

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

1 Like

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!

3 Likes