Skip to content

[Bug] Help Center article editor loads empty on a direct URL, and saving then overwrites the article #488

Description

@ColdFire87

If I open a Help Center article's edit page straight from its URL, the editor loads empty with a red "Invalid input" underneath. The article is fine: the public page renders normally and the content is still in the database.

Reaching the same article through the UI (Help Center list, hover the row, ... then Edit) loads the content correctly. So it's only the direct load that breaks.

The part that worries me is a refresh. If you're editing an article and hit reload, you get the blank editor, and pressing "Save changes" from there overwrites the article with nothing. Same for pasting the link to a colleague, opening in a new tab, or a session restore after a browser restart.

My guess at the cause: kb_articles.id is a uuid, but the edit URL uses article_01m1hnhvqfe02brc2775jj45g1, and no row stores an id in that shape. Looks like the prefixed id isn't decoded on the server side, so the loader gets nothing and the form reports "Invalid input".

Repro:

  1. Open any Help Center article in the admin, via the list
  2. Copy the URL and paste it into a new tab (or just refresh the page)
  3. Editor is empty and "Invalid input" appears

Even if the decode is awkward to fix, it would help a lot if "Save changes" were disabled when the editor didn't load, so a stray refresh can't silently empty an article.

Self-hosted 0.13.2.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions