Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293238

Some configuration entities are created as in language unknown

$
0
0

Problem

Some (or all?) of the configuration entities in the installation process are created as being unknown language (langcode und), although the text used to create them (image style label, menu title and description) are English. These default created configuration entities should be created with langcode 'en'. (It is not an issue if English is not actually a configured language on the site).

Config entities created in the install process, such as the Tags taxonomy vocabulary specify this properly as in:

<?php
  $vocabulary
= entity_create('taxonomy_vocabulary', array(
   
'name'=> st('Tags'),
   
'description'=> $description,
   
'vid'=> 'tags',
   
'langcode'=> language_default()->langcode,
   
'help'=> $help,
  ));
 
taxonomy_vocabulary_save($vocabulary);
?>

Although the language system defaults to 'en' when there is no language code on a config object, for config entities, the entity system defaults to 'und' (since it cannot really know even if 'en' is available on the site), so when the config is saved for some reason, a missing langcode turns into a 'und' langcode, and that disrupts our assumptions.

Reproduce manually

- Check out http://drupal.org/project/config_translation
- Go to Admin > Config > Configuration translation
- See how config entities will show up as "Uknown language" while non-entity config will properly default to English

AttachmentSizeStatusTest resultOperations
default-config-langcode-en.patch10.28 KBIdlePASSED: [[SimpleTest]]: [MySQL] 52,558 pass(es).View details | Re-test

Viewing all articles
Browse latest Browse all 293238

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>