Commit 2daec0d0 authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents 786d306f cd5a3b1f
......@@ -9,24 +9,12 @@ source:
plugin: d7_url_alias
constants:
slash: '/'
slashnode: '/node/'
base: '/node/'
conditions:
- field: ua.source
value: '%node/%'
operator: LIKE
process:
_alias_type:
-
plugin: explode
source: source
delimiter: '/'
-
plugin: single_value
-
plugin: extract
index:
- 0
-
plugin: skip_on_value
method: row
value: 'node'
not_equals: true
new_nid:
-
plugin: explode
......@@ -59,7 +47,7 @@ process:
path:
plugin: concat
source:
- constants/slashnode
- constants/base
- '@new_nid'
alias:
plugin: concat
......
id: uw_url_alias_taxonomy
label: URL aliases (Taxonomy terms)
migration_group: uw
migration_tags:
- Drupal 7
- Content
- Etc
source:
plugin: d7_url_alias
constants:
slash: '/'
base: '/taxonomy/term/'
conditions:
- field: source
value: '%taxonomy/term/%'
operator: LIKE
process:
new_tid:
-
plugin: explode
source: source
delimiter: '/'
-
plugin: single_value
-
plugin: extract
index:
- '2'
default: 0
-
plugin: skip_on_empty
method: row
-
plugin: migration_lookup
migration:
- uw_taxonomy_term
no_stub: true
-
plugin: skip_on_empty
method: row
path:
plugin: concat
source:
- constants/base
- '@new_tid'
alias:
plugin: concat
source:
- constants/slash
- alias
langcode: language
destination:
plugin: entity:path_alias
migration_dependencies:
required: {}
optional:
- uw_taxonomy_term
......@@ -3,6 +3,7 @@
namespace Drupal\uw_migrate\Plugin\migrate\source;
use Drupal\uw_migrate\UwWebformTrait;
use Drupal\webform\Plugin\WebformHandler\EmailWebformHandler;
use Drupal\webform\Utility\WebformYaml;
use Drupal\webform_migrate\Plugin\migrate\source\d7\D7Webform;
use Drupal\Component\Utility\Bytes;
......@@ -502,6 +503,22 @@ class UwWebform extends D7Webform {
];
}
// Convert "default" to "_default". See webform_update_8131().
$default_settings = [
'to_mail',
'from_mail',
'from_name',
'subject',
'body',
];
foreach (array_keys($handlers) as $id) {
foreach ($default_settings as $setting) {
if ($handlers[$id]['settings'][$setting] === 'default') {
$handlers[$id]['settings'][$setting] = EmailWebformHandler::DEFAULT_VALUE;
}
}
}
return $handlers;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment