Duplicate menu_link_content revisions on Node save via menu_ui.

Created on 17 July 2020, almost 5 years ago
Updated 24 April 2025, 12 days ago

I am using Content Moderation module as well as the menu_ui module for nodes. I actually enabled a workflow for Menu_link_content and discovered that token_node_menu_link_submit() is saving the menu_link_content.

The consequences of this is that it is actually one of two times that the same menu_link_content entity gets saved. Once by it at #entity_builder, and then again by menu_ui_form_node_form_submit().

For me, perhaps because I have revisioning as mandatory, it is causing two revisions to be created for Menu link content for every time a Node is saved.

I'm not totally grasping the need for this, so if anybody has an opinion on this let me know. I was considering removing the save() method from token_node_menu_link_submit(), or even just adding a line to manually prevent revision creation for the same function.

This is kind of one of those situations where I more or less know the solution to "fix" my issue, but I am worried of unintentionally causing a bug by patching it improperly. I suppose in the same way that this function to begin with unintentionally caused a bug for me.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada RedLucas25

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024