Loading core/modules/node/src/Plugin/migrate/source/d6/Node.php +4 −0 Original line number Diff line number Diff line Loading @@ -297,6 +297,10 @@ protected function getFieldData(array $field, Row $node) { if (isset($query)) { $columns = array_keys($field['db_columns']); // If there are no columns then there are no values to return. if (empty($columns)) { return []; } // Add every column in the field's schema. foreach ($columns as $column) { Loading core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php +24 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,18 @@ public function providerSource() { 'active' => '1', 'locked' => '0', ], [ 'field_name' => 'field_test_empty_db_columns', 'type' => 'empty_db_columns', 'global_settings' => 'a:0:{}', 'required' => '0', 'multiple' => '0', 'db_storage' => '1', 'module' => 'empty_db_columns', 'db_columns' => 'a:0:{}', 'active' => '1', 'locked' => '0', ], ]; $tests[0]['source_data']['content_node_field_instance'] = [ [ Loading @@ -52,6 +64,18 @@ public function providerSource() { 'widget_module' => 'number', 'widget_active' => '1', ], [ 'field_name' => 'field_test_empty_db_columns', 'type_name' => 'story', 'weight' => '33', 'label' => 'Empty db_columns Field', 'widget_type' => 'empty_db_columns', 'widget_settings' => 'a:0:{}', 'display_settings' => 'a:0:{}', 'description' => 'An example field with empty db_columns.', 'widget_module' => 'empty_db_columns', 'widget_active' => '1', ], ]; $tests[0]['source_data']['content_type_story'] = [ [ Loading Loading
core/modules/node/src/Plugin/migrate/source/d6/Node.php +4 −0 Original line number Diff line number Diff line Loading @@ -297,6 +297,10 @@ protected function getFieldData(array $field, Row $node) { if (isset($query)) { $columns = array_keys($field['db_columns']); // If there are no columns then there are no values to return. if (empty($columns)) { return []; } // Add every column in the field's schema. foreach ($columns as $column) { Loading
core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php +24 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,18 @@ public function providerSource() { 'active' => '1', 'locked' => '0', ], [ 'field_name' => 'field_test_empty_db_columns', 'type' => 'empty_db_columns', 'global_settings' => 'a:0:{}', 'required' => '0', 'multiple' => '0', 'db_storage' => '1', 'module' => 'empty_db_columns', 'db_columns' => 'a:0:{}', 'active' => '1', 'locked' => '0', ], ]; $tests[0]['source_data']['content_node_field_instance'] = [ [ Loading @@ -52,6 +64,18 @@ public function providerSource() { 'widget_module' => 'number', 'widget_active' => '1', ], [ 'field_name' => 'field_test_empty_db_columns', 'type_name' => 'story', 'weight' => '33', 'label' => 'Empty db_columns Field', 'widget_type' => 'empty_db_columns', 'widget_settings' => 'a:0:{}', 'display_settings' => 'a:0:{}', 'description' => 'An example field with empty db_columns.', 'widget_module' => 'empty_db_columns', 'widget_active' => '1', ], ]; $tests[0]['source_data']['content_type_story'] = [ [ Loading