Summary
Canvas ships canvas_page base fields as non-translatable, and nothing in Canvas Translate checks that a site has actually enabled translation for pages. On a misconfigured site (setup never done, or silently reverted by a config import), the editor and publish flow work normally, but every write to the "translation" lands on the field storage shared between all languages: publishing silently overwrites the original language.
The risk is that the misconfiguration is invisible until the damage is done. Nothing fails, nothing warns; the translator only notices when the source page comes back translated.
Steps to reproduce
- Translate any page in the Canvas Translate editor and publish.
- The default-language page now shows the translated text.
Proposed resolution
Detect the misconfiguration and refuse before anything is written:
- When page translation cannot work at all (bundle not translation-enabled, or no writable field translatable), every endpoint refuses with 409,
code: translation_not_enabled, and the SPA hides the whole workspace behind setup instructions. The status report flags it viahook_runtime_requirements()(error on multilingual sites). - Publish additionally never writes a non-translatable field (guard at the write site), so no future path can reintroduce the clobber.
Issue fork canvas_translate-3611372
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
lauriii