diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 1895cfd..75ec244 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -576,7 +576,7 @@ protected function setDefaultLangcode() { } if (empty($this->defaultLangcode)) { // Make sure we return a proper language object. - $this->defaultLangcode = Language::LANGCODE_NOT_SPECIFIED; + $this->defaultLangcode = $this->languageManager()->getCurrentLanguage()->getId(); } // This needs to be initialized manually as it is skipped when instantiating // the language field object to avoid infinite recursion.