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

  1. Translate any page in the Canvas Translate editor and publish.
  2. The default-language page now shows the translated text.

Proposed resolution

Detect the misconfiguration and refuse before anything is written:

  1. 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 via hook_runtime_requirements() (error on multilingual sites).
  2. Publish additionally never writes a non-translatable field (guard at the write site), so no future path can reintroduce the clobber.
Command icon 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

lauriii created an issue. See original summary.

  • lauriii committed c7f4ffed on 1.0.x
    feat: #3611372 Guard against misconfiguration: publishing a translation...
lauriii’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.