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

  1. Use MCP Sentinel 2.25.5 with Drupal 11.3.18 and PHP 8.3.
  2. Create a published English page with translation and editorial moderation enabled.
  3. Save a pending English draft.
  4. 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.

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

jmcerda created an issue. See original summary.

  • 8a109c38 committed on 1.x
    Merge branch '1.x' into cursor/mcp-admin-ux-761-762-764-6949
    
    Resolve...

  • adf6052d committed on 1.x
    Issue #3627189: Re-read stored working revision under translation create...

  • 8a109c38 committed on cursor/mcp-admin-ux-761-762-764-6949
    Merge branch '1.x' into cursor/mcp-admin-ux-761-762-764-6949
    
    Resolve...

  • adf6052d committed on cursor/mcp-admin-ux-761-762-764-6949
    Issue #3627189: Re-read stored working revision under translation create...

  • b1f08a4f committed on cursor/translation-false-conflict-20d5
    Issue #3627189: Reload stored working revision without Drupal 11-only...
jmcerda’s picture

Version: 2.25.5 » 1.x-dev
Status: Active » Fixed

Fixed 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.

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.

jmcerda’s picture

Version: 1.x-dev » 2.27.0

Shipped in 2.27.0.

  • jmcerda committed b0f9f215 on 1.x
    Issue #3627189: Ignore PHPStan's truncated revision-method name
    
    PHPStan...

  • jmcerda committed 601b89f0 on 1.x
    Issue #3627189: Fix the sealed-token and kernel failures blocking CI...

  • jmcerda committed 3a20ccf3 on 1.x
    Issue #3627189: Load revisions in the paragraph translation test without...

  • jmcerda committed b0f9f215 on fix/3627189-floor-test-revision-load
    Issue #3627189: Ignore PHPStan's truncated revision-method name
    
    PHPStan...

  • jmcerda committed 601b89f0 on fix/3627189-floor-test-revision-load
    Issue #3627189: Fix the sealed-token and kernel failures blocking CI...

  • jmcerda committed b0f9f215 on feature/scheduled-publish-gate
    Issue #3627189: Ignore PHPStan's truncated revision-method name
    
    PHPStan...

  • jmcerda committed 601b89f0 on feature/scheduled-publish-gate
    Issue #3627189: Fix the sealed-token and kernel failures blocking CI...

  • jmcerda committed 3a20ccf3 on feature/scheduled-publish-gate
    Issue #3627189: Load revisions in the paragraph translation test without...

Status: Fixed » Closed (fixed)

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