Why my custom submit handler isn't working in menu item edit form? Code: 

/**
 * Implements hook_form_FORM_ID_alter().
 */
function mymod_form_menu_link_content_menu_link_content_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {

  array_unshift($form['#submit'], 'mymod_menu_link_content_form_submit');
}

function mymod_menu_link_content_form_submit($form, \Drupal\Core\Form\FormStateInterface $formState) {
  //some code
}


Debug shows me that my custom submit handler is added to $form['#submit'] array as a first item. However this submit handler is never called.
Forms can have submit callbacks in two places. Either on the form level or on the button that is pressed. The form level callbacks are only invoked if no button-specific callbacks are specified.

Entity forms generally have the submit callbacks on the submit button, which is usually $form['actions']['submit']['#submit'].

This was the same in Drupal 7, although the node form and possibly others had a backwards compatibility layer that also invoked form-level submit callbacks, but this was removed.