#11352·chatwoot

Help Center article creation errors

Author: stenioanibalCreated Apr 22, 2025Updated Sep 16, 2026
Labelsseverity: 2🍐 feature/helpcenterBug

Describe the bug

When creating a Help Center article, the creation process in the database is split into two parts:

The first step is triggered by the blur event on the title input field. This step creates the article record and generates the article's slug.

The second step involves saving the content from the editor, triggered by autosave mechanisms.

However, in certain scenarios, the second step can be triggered before the first one is completed. For example, if a user types a title, does not remove focus from the title field, clicks directly into the content editor, and pastes content, autosave is triggered prematurely.

This results in two possible issues:

1 - Internal server error: ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_articles_on_slug")

2 - A duplicated article is created as a draft, leading to confusion and content duplication in the Help Center.

To Reproduce

1 - Go to the Help Center -> Articles and click on "+ New article".

2 - Enter a title for the article, but do not click or tab away from the title field (blur event is not triggered).

3 - Click directly on the content editor.

4 - Paste a content quickly (which triggers autosave).

5 - Observe the result — either an internal server error or a duplicated draft article.

Expected behavior

Autosave and article content persistence should only occur after the article record has been successfully created in the database via the title field blur event. This would prevent race conditions, slug duplication, and unintended drafts.

Environment

Linux VM

Cloud Provider

DigitalOcean

Platform

Browser

Operating system

Ubuntu 25.04

Browser and version

Chrome Version 135.0.7049.95 (Official Build) (64-bit)

Docker (if applicable)

No response

Additional context

This issue stems from the lack of a mechanism to ensure the first part of the article creation flow is completed before allowing autosave/content updates. A safeguard should be implemented to defer autosave behavior until the article creation (title and slug generation) is confirmed.