I ran into this issue when trying to use the deploy module with an entity menu item that had been given fields. During the comparison with `(array_intersect_key($item, $existing_item) != $existing_item)`, it does not take fields into consideration and will assume the menu item is the same and won't save (and also won't trigger menu_link_insert or menu_link_update).

My fix was to add a property on the menu item for "force_save" and use hook_menu_link_alter to toggle it to TRUE.

Comments

CoderBrandon created an issue. See original summary.

coderbrandon’s picture

StatusFileSize
new736 bytes
coderbrandon’s picture

StatusFileSize
new772 bytes

Updating patch to be from correct directory.

joshf’s picture

Status: Active » Needs review
joshf’s picture

The last submitted patch, 2: menu-add_force_save-2808049-2.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 3: menu-add_force_save-2808049-3.patch, failed testing. View results

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.