Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is an unusual migration and will need two process plugins, one for all, one for configurable. This is the pseudocode that needs to run:
$default = // .. copypaste from https://api.drupal.org/api/drupal/modules%21locale%21locale.module/function/locale_language_types_info/7
$language_types = variable_get('language_types', $default);
\Drupal::config('system.language.types')
->set('all', array_keys($language_types);
->set('configurable', array_keys(array_filter($language_types))
->save();
Comments
Comment #1
chx CreditAttribution: chx commentedtalked to penyaskito briefly on IRC, this indeed makes no sense. Let's see what Gabor remembers of this.
Comment #2
Gábor HojtsyLooking at the blame, this update seems to be attempting to convert the 'language_interface', 'language_url' etc. variable table values to be values under the 'system.language.types' config file under a 'configurable' key. system.language.types's configurable key seems to be used extensively in the new code.
It is true that the removed code only contains variables 'language_types' and "language_negotiation_$language_type", although there are still uses left of "language_negotiation_$language_type" (at least in this patch itself).
So looks like the variables being converted don't actually exist. I think the intent was to convert 'language_types' based on this diff:
Comment #3
chx CreditAttribution: chx commentedSo, I do not know anything about this nor do I intend to learn every crazyness we stuffed in the variable table beforehands. I just need a config file name, seems system.language.types plus an array in the format of $destination => $source where $source is the D7 variable_get($source) and $destination is the $config->get($destination) . For a better description, read the https://drupal.org/node/2127611 Migration handbook especially the https://drupal.org/node/2129651 process plugin (unlike me who doesn't need custom language negotiation, you will need to learn migration eventually :P )
Comment #4
chx CreditAttribution: chx commentedOK, so we are migrating the variable language_types. The default of this variable is locale_language_types_info.
The resulting config file is system.language.types . This has two top level keys: all and configurable. What needs to run, in pseudocode (because this would be broken in migrate and upgrade both):
Comment #5
Gábor HojtsyLooks good, we figured this out based on http://drupalcode.org/project/drupal.git/commitdiff/d5d172e3c8b639c565f4... essentially.
Comment #6
chx CreditAttribution: chx commentedComment #7
chx CreditAttribution: chx commentedComment #8
eliza411 CreditAttribution: eliza411 commentedComment #9
eliza411 CreditAttribution: eliza411 commented