Skip to content
Snippets Groups Projects
Unverified Commit 81174ad7 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2784783 by RytoEX, quietone, jofitz, Charlotte17, Anybody,...

Issue #2784783 by RytoEX, quietone, jofitz, Charlotte17, Anybody, tomhollevoet, catch, Grevil: Migration of nodes with cck nodereferrer fields fails (SQL error)
parent 775223c0
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
......@@ -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'] = [
[
......@@ -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'] = [
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment