Problem/Motivation

On Drupal 10.6.18/PHP 8.2 with Entity Reference Revisions 1.14.0 and Paragraphs 1.23.0, creating a translated node draft can fail validation when an unchanged referenced paragraph revision is older than that paragraph’s default revision.

The response is HTTP 422: Entity is not valid: Non-translatable fields can only be changed when updating the original language. The request changes only the node’s translated title; it does not change the paragraph reference or its pinned revision.

Reproduction

  1. Use a translatable, moderated page with a shared Entity Reference Revisions field referencing a translatable text paragraph.
  2. Publish an English page that pins a paragraph whose text is Hero.
  3. Create a newer default revision of that paragraph with text Default later, leaving the published page pinned to the earlier revision.
  4. Create a Spanish draft of the page, changing its title only and retaining the original paragraph pin.

The existing McpDraftParagraphTranslationTest::testNonDefaultPinnedRevisionTranslation in released MCP Sentinel 2.25.5 provides an executable reproduction. On an unchanged release checkout against the dependency versions above, it fails at line 207: expected HTTP 200, received 422 (1 test, 18 assertions). A separate candidate produces the same response before its changed save path. The same existing test passes on Drupal 11.3.18.

Investigation

Source review points to EntityReferenceRevisionsFieldItemList::hasAffectingChanges(): the loaded-revision original is set only on Drupal 11.3+. On Drupal 10.6, ContentEntityBase::hasTranslationChanges() can instead compare the pinned paragraph against its newer default revision. This appears related to the loaded-versus-default comparison discussed in #3388540, but the supported Drupal 10 path remains affected. This is the working diagnosis; a focused ERR regression and fix are still needed.

Proposed resolution

Compare against the referenced loaded revision on supported older core as well, using the appropriate revision-loading API. Preserve validation of actual shared-field changes, paragraph IDs, revision pins and the published English content. Do not bypass the non-translatable-field constraint.

Remaining tasks

Add an ERR-level regression, implement and review the compatible original-revision read, and qualify supported core versions.

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.