Stuck Drafts That Cannot Be Deleted or Edited After Upgrading

Applies to: Mattermost Server v11.3 and later (self-managed deployments using PostgreSQL)

Symptoms: Some users cannot delete or edit certain drafts, and the server log records a 500 error when they try.


🛑 Problem

Some drafts created before you upgraded to v11.3 are missing an internal value that newer versions expect. When a user tries to delete or edit one of these older drafts, the server cannot read it and returns an error, so the draft stays in place and cannot be removed or changed. The drafts list itself still displays normally.

The browser-based steps in Fixing ghost drafts do not resolve this, because that procedure only clears the local browser or desktop app cache. This issue lives in the server database, not in the client.

Symptoms

Users or administrators experiencing this issue will see:

"msg":"Unable to get the Draft.","err_where":"GetDraft","http_code":500,"method":"DELETE",
"error":"... sql: Scan error on column index 10, name \"type\": converting NULL to string is unsupported"

Additional symptoms:

  • A draft is visible to the user but cannot be deleted or edited.
  • The delete or edit action fails with a 500 error in the server logs.

âś… Solution

The affected drafts are corrected with a small database update that fills in the missing value. Once it runs, the drafts can be deleted and edited normally. No server restart is required.

⚠️ Important: Manual database changes are not recommended and are not part of normal Mattermost administration. In this specific case, a direct database update is currently the only way to clear the affected drafts. Take a full database backup first, run the change during a maintenance window, and proceed only if you are comfortable editing the database directly. If you are unsure, contact Mattermost support before making any changes.

Back Up the Database

Take a complete backup of your Mattermost database before making any changes.

Run the Update

Connect to your Mattermost PostgreSQL database and run:

UPDATE drafts SET type = '' WHERE type IS NULL;

This should clears the stuck drafts.

Additional Resources

For more information, see:

Fixing ghost drafts

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.