When using the module Content Type: Extras to add a second Save button at the top of the referenced entity, Entity Connect does not return the user to the parent entity after saving (or even cancelling). Instead it sends the user to the referenced entity itself. Note that we had previously used our own custom module to add a second Save button and it caused the same issue with not returning properly. Our module was very simple, just altering the node form to add another submit. Like this:
function second_save_form_node_form_alter(&$form, &$form_state, $form_id) {
$form['submit2'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#access' => TRUE,
'#submit' => array('node_form_submit'),
'#weight' => -10,
);
}
Looking at the Entity Connect code we see it is definitely working with the submit button -- so obviously the approach we are using is doomed to fail.
If anyone has any advice on how to get a second save button on the edit form without messing up entity connect we would love to hear it. For now, we'll probably do it with a second fake save button that just clicks the main button using javascript.
Comments
Comment #2
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.