Problem/Motivation

#2457653: System.site langcode is both used as a file language code and a site language code has introduced new config item in system.site for default language code, which is not updated in docblock of Drupal\language\LanguageServiceProvider::getDefaultLanguageValues()

Proposed resolution

Update the docblock.

Remaining tasks

User interface changes

N/A

API changes

N/A

Original report by @epari.siva

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

siva_epari’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
768 bytes
--- a/core/modules/language/src/LanguageServiceProvider.php

     $system = $config_storage->read('system.site');
-    $default_language = $config_storage->read(static::CONFIG_PREFIX . $system['default_langcode']);
+    $default_language = $config_storage->read(static::CONFIG_PREFIX . $system['langcode']);
siva_epari’s picture

vijaycs85’s picture

good catch @epari.siva. Let's add some test and update issue summary with beta-evaluation.

vijaycs85’s picture

Issue tags: +D8MI, +sprint

Adding to D8MI sprint...

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Nonono. The default_langcode is intended there, see #2457653: System.site langcode is both used as a file language code and a site language code. We can swallow a notice there I guess.

The last submitted patch, 1: undefined_index_-2460027-1.patch, failed testing.

siva_epari’s picture

Reinstalling Drupal fixed it. So, we can close this issue?

vijaycs85’s picture

Title: Undefined index: default_langcode in Drupal\language\LanguageServiceProvider->getDefaultLanguageValues() » update the documentation of Drupal\language\LanguageServiceProvider->getDefaultLanguageValues()
Status: Needs work » Needs review
FileSize
770 bytes

yeah, I can't reproduce either.

At least we can use this issue to update the documentation.

vijaycs85’s picture

Title: update the documentation of Drupal\language\LanguageServiceProvider->getDefaultLanguageValues() » update the documentation of Drupal\language\LanguageServiceProvider::getDefaultLanguageValues()
Component: language system » documentation
Issue summary: View changes
Gábor Hojtsy’s picture

Title: update the documentation of Drupal\language\LanguageServiceProvider::getDefaultLanguageValues() » Update the documentation of Drupal\language\LanguageServiceProvider::getDefaultLanguageValues()
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests, -Needs issue summary update +language-base

Looks good to me.

jhodgdon’s picture

doc fix++

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice find. Docs are not frozen in beta. Committed 581c3a0 and pushed to 8.0.x. Thanks!

  • alexpott committed 581c3a0 on 8.0.x
    Issue #2460027 by epari.siva, vijaycs85: Update the documentation of...
Gábor Hojtsy’s picture

Issue tags: -sprint

Amazing, thanks.

Status: Fixed » Closed (fixed)

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