From 9f9a441d6dc332eda390f0a22e34334a9377ec19 Mon Sep 17 00:00:00 2001 From: Jason Peak Date: Fri, 6 Nov 2015 10:30:42 -0600 Subject: [PATCH 1/2] first draft fix for #93 --- islandora_basic_image/islandora_basic_image.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 71013339..479ea79f 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -33,6 +33,7 @@ function islandora_basic_image_form($node, array &$form_state) { * Implements hook_form_FORM_ID_alter(). */ function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form, array &$form_state, $form_id) { + dpm($form); $form['title']['#weight'] = -6; $form['obj'] = array( '#type' => 'file', @@ -81,8 +82,8 @@ function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form function islandora_basic_image_add_parent_uuid(array $form, array &$form_state) { $node = $form_state['node']; $node->parent_collection = ""; - if (isset($form_state['parent_collection']['#value'])) { - $node->parent_collection = $form_state['parent_collection']['#value']; + if (isset($form_state['values']['parent_collection'])) { + $form_state['values']['field_fedora_has_parent']['und'][0]['value'] = $form_state['values']['parent_collection']; } } From 0fd09d5bdd860dacbf731c00aac2ad57bcb7adce Mon Sep 17 00:00:00 2001 From: Jason Peak Date: Mon, 9 Nov 2015 13:38:13 -0600 Subject: [PATCH 2/2] Removes debug stmt. --- islandora_basic_image/islandora_basic_image.module | 1 - 1 file changed, 1 deletion(-) diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 479ea79f..014fb346 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -33,7 +33,6 @@ function islandora_basic_image_form($node, array &$form_state) { * Implements hook_form_FORM_ID_alter(). */ function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form, array &$form_state, $form_id) { - dpm($form); $form['title']['#weight'] = -6; $form['obj'] = array( '#type' => 'file',