Problem/Motivation
Creating a Spanish draft on a node with a pending English working copy returns HTTP 409 saying the translation already exists, although the fixture has not created Spanish. The existing testEnglishWorkingCopyPreservedWhenAddingTranslation regression fails at McpDraftTranslationTest.php:193.
Steps to reproduce
- Use MCP Sentinel 2.25.5 with Drupal 11.3.18 and PHP 8.3.
- Create a published English page with translation and editorial moderation enabled.
- Save a pending English draft.
- POST the governed translation-create endpoint for Spanish with the live and working revision IDs in If-Match.
Expected: HTTP 200, Spanish draft created, pending English and published revision preserved. Actual: HTTP 409, "A translation for this language already exists. Continue it instead of creating it."
Reproduced in hosted previous-minor jobs 12546779, 12550363, and 12550414. An isolated PostgreSQL fixture on Drupal 11.3.18/PHP 8.3.32 reproduces the same failure: 1 test, 7 assertions, 1 failure. Dependency deprecations remain visible.
Proposed resolution
Investigate the revision re-read under the save lock. The candidate working revision is mutated before the existing-translation check; a cached revision may expose that in-memory mutation. This is a hypothesis pending instrumentation, not an established cause. Preserve stale-write rejection and all live/working translation data.
Remaining tasks
Confirm the cause, implement the bounded repair, rerun translation and preservation tests across supported Drupal versions, and review concurrency behavior.
User interface changes
None proposed.
API changes
Restore the existing successful translation-create contract; retain genuine conflict responses.
Data model changes
None proposed.
Issue fork mcp_sentinel-3627189
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 #8
jmcerdaFixed on 1.x. Creating a translation no longer returns a false HTTP 409 when another language already has a pending working copy. The save lock re-reads the stored working revision. A language that is actually present on the live or working revision is still a conflict. This ships in 2.27.0.
Comment #10
jmcerdaShipped in 2.27.0.