The function location_addanother_form_submit incorrectly coded to determine the 'nid'.

A fix is proposed below that works.

/**
* Submission function for "add another location" form.
*/
function location_addanother_form_submit($form, &$form_state) {
$location = $form_state['values']['location'];

// $node = node_load($location['nid']);
$node = $form_state['#node']; // Replacement code for the line 117 above
$locations = $node->locations;
// unset($location['nid']); // Code not required
$locations[] = $location;

location_save_locations($locations, array('nid' => $node->nid, 'vid' => $node->vid));

return 'node/' . $node->nid;
}

Comments

rgdonaldson created an issue.