InvalidArgumentException: Invalid translation language (und) specified. in Drupal\Core\Entity\ContentEntityBase->addTranslation() (line 953 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).

Created on 8 January 2019, almost 6 years ago
Updated 6 August 2024, 4 months ago

Trying to edit certain nodes I am getting:

The website encountered an unexpected error. Please try again later.

InvalidArgumentException: Invalid translation language (und) specified. in Drupal\Core\Entity\ContentEntityBase->addTranslation() (line 953 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
entity_reference_revisions_entity_revision_create(Object, Object, NULL)
call_user_func_array('entity_reference_revisions_entity_revision_create', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_revision_create', Array) (Line: 327)
Drupal\Core\Entity\ContentEntityStorageBase->createRevision(Object, ) (Line: 294)
Drupal\content_moderation\EntityTypeInfo->entityPrepareForm(Object, 'edit', Object) (Line: 136)
content_moderation_entity_prepare_form(Object, 'edit', Object)
call_user_func_array('content_moderation_entity_prepare_form', Array) (Line: 408)
Drupal\Core\Entity\EntityForm->prepareInvokeAll('entity_prepare_form', Object) (Line: 139)
Drupal\Core\Entity\EntityForm->init(Object) (Line: 291)
Drupal\Core\Entity\ContentEntityForm->init(Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('node_services_edit_form', Object) (Line: 275)
Drupal\Core\Form\FormBuilder->buildForm('node_services_edit_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 41)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 669)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

It seems odd that entity_reference_revisions_entity_revision_create is being called by simply loading node/xx/edit

Seems related to comment 83 of #2961399: Support parallel translation forward revisions on untranslatable fields .

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇨🇦Canada alberto56

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024