Browse Source

Migrate fix (#818)

pull/828/head
Eli Zoller 4 years ago committed by GitHub
parent
commit
986a3d4ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      islandora.install
  2. 3
      modules/islandora_core_feature/config/install/migrate_plus.migration.islandora_tags.yml

20
islandora.install

@ -70,3 +70,23 @@ function islandora_update_8004() {
} }
} }
} }
/**
* Makes migrate_tags an array.
*/
function islandora_update_8005() {
$config_factory = \Drupal::configFactory();
$config_factory->getEditable('migrate_plus.migration.islandora__tags')->delete();
$config = $config_factory->getEditable('migrate_plus.migration.islandora_tags');
if ($config) {
if (!is_array($config->get('migration_tags'))) {
$config->set('migration_tags', [$config->get('migration_tags')]);
$config->save(TRUE);
}
if (!$config->get('source.ids')) {
$config->set('source.ids', $config->get('source.keys'));
$config->clear('source.keys');
$config->save(TRUE);
}
}
}

3
modules/islandora_core_feature/config/install/migrate_plus.migration.islandora_tags.yml

@ -8,7 +8,8 @@ id: islandora_tags
class: null class: null
field_plugin_method: null field_plugin_method: null
cck_plugin_method: null cck_plugin_method: null
migration_tags: islandora_tags migration_tags:
- islandora_tags
migration_group: islandora migration_group: islandora
label: 'Tags migration from CSV' label: 'Tags migration from CSV'
source: source:

Loading…
Cancel
Save