Skip to content

fix: project description editor never loads, blocking project save (#11302)#11329

Open
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:fix/11302-project-description-editor
Open

fix: project description editor never loads, blocking project save (#11302)#11329
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:fix/11302-project-description-editor

Conversation

@BenJule

@BenJule BenJule commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #11302. In the Project tab, the Description field is required but there's no editor to type into, and saving fails with "The project description is empty" with no way to fix it (see the screenshots in the issue).

Root cause

The description editors (CKEditor) are created in resources/web/model_new/js/ckeditor_config.js, but only inside the onload handler of a dynamically-loaded translation file:

script.src = `../include/ckeditor5/translations/${editorLanguage}.umd.js`;
script.onload = () => { ClassicEditor.create('#editor', ...); ... };

editor.html is navigated to without a ?lang= query, so editorLanguage falls back to navigator.language, which the webview commonly reports as en-US. That resolves to translations/en-us.umd.js, which doesn't exist (only en, en-au, en-gb ship). A missing file fires onerror, not onload, so the editors are never created: no description field appears, and the required-field validation then blocks saving for everyone in this situation, regardless of UI language.

Fix

Initialise the editors on both onload and onerror (guarded so they're created only once). If the translation file fails to load, the editors still come up (in English) instead of leaving the page with no description editor at all.

Test plan

  • JS-only change in ckeditor_config.js, syntax-checked with node --check.
  • Open the Project tab → Edit: the description editor now appears and a project can be saved, even when the resolved locale has no CKEditor translation file. When the translation does load, behaviour is unchanged (the guard prevents double init).
…11302)

The CKEditor instances for the project/profile description were only created
in the translation script's onload handler. editor.html is opened without a
?lang= query, so the locale falls back to navigator.language (often en-US in
the webview), which resolves to a translation file that doesn't exist
(en-us.umd.js). The failed load fires onerror, not onload, so the editors were
never created: there was no description field and 'The project description is
empty' blocked saving for everyone.

Initialise the editors on both onload and onerror (guarded so they're only
created once), so a missing/failed translation file no longer leaves the page
without a usable description editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant