While generating Preview of a node that has Menu Structure setting in it, this Setting is permanently stored via "token_node_menu_link_submit" and further $entity->save();. Proposing escaping of this while ::preview is within $form_state->getSubmitHandlers(). Patch will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fledev created an issue. See original summary.

flefle’s picture

Issue summary: View changes
flefle’s picture

Berdir’s picture

Status: Active » Needs review
Berdir’s picture

Status: Needs review » Closed (duplicate)

There is an existing issue for this, see #2823731: Node preview button generates useless menu link. Feel free to propose your implementation there, but still needs tests. We have existing tests for the menu link functionality, it should be possible to extend them.