Commit d644718d authored by alexpott's avatar alexpott
Browse files

Issue #2394571 by benjy: Filter formats on cck text fields are not looked up in the idMap

parent d3e7bdb1
......@@ -111,6 +111,26 @@ public function loadMultiple(EntityStorageInterface $storage, array $sub_ids = N
],
];
}
elseif ($data['type'] === 'text') {
$migration->process[$field_name . '/value'] = $field_name . '/value';
// See d6_user, signature_format for an example of the YAML that
// represents this process array.
$migration->process[$field_name . '/format'] = [
[
'plugin' => 'static_map',
'bypass' => TRUE,
'source' => $field_name . '/format',
'map' => [0 => NULL]
],
['plugin' => 'skip_process_on_empty'],
[
'plugin' => 'migration',
'migration' => 'd6_filter_format',
'source' => $field_name . '/format',
'no_stub' => 1,
],
];
}
else {
$migration->process[$field_name] = $field_name;
}
......
......@@ -268,7 +268,7 @@ public function fields() {
public function fieldData() {
$field_info = $this->getSourceFieldInfo($this->configuration['bundle']);
$field_info['nid'] = ['type' => 'number'];
$field_info['type'] = ['type' => 'text'];
$field_info['type'] = ['type' => 'varchar'];
return $field_info;
}
......
......@@ -167,7 +167,7 @@ protected function setUp() {
public function testCckFields() {
$node = Node::load(1);
$this->assertEqual($node->field_test->value, 'This is a shared text field', "Shared field storage field is correct.");
$this->assertEqual($node->field_test->format, 1, "Shared field storage field with multiple columns is correct.");
$this->assertEqual($node->field_test->format, 'filtered_html');
$this->assertEqual($node->field_test_two->value, 10, 'Multi field storage field is correct');
$this->assertEqual($node->field_test_two[1]->value, 20, 'Multi field second value is correct.');
$this->assertEqual($node->field_test_three->value, '42.42', 'Single field second value is correct.');
......
Markdown is supported
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