Problem/Motivation

Using 8.8.x and Standard profile.

  • Install menu_link module
  • Install Content Moderation and enable the Editorial workflow on the Basic page content type
  • Create a new basic page node and add a menu link to the Main navigation
  • Edit the node, update it's title and set it to draft and then save
  • Go to the menu UI for the main navigation, and reorder the menu items and save

Actual behaviour:
The pending revision has been overwritten by a new revision as the node got resaved. Data loss.

Expected behaviour:
The node should still has its pending revision.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3092566-3.patch1022 bytesjohnwebdev

Issue fork menu_link-3092566

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

johndevman created an issue. See original summary.

johnwebdev’s picture

Issue summary: View changes
johnwebdev’s picture

Status: Active » Needs review
StatusFileSize
new1022 bytes

Here is a initial patch.

This patch does not solve the problem entirely:

If the menu link is changed while a pending revision exists, the pending revision will override that menu link once it's set to default revision. This can be solved by that we ensure the pending revision menu link (the stored value) matches the current menu plugin definition when saving. But this should only happen if the menu link is moved through the Menu UI. So maybe a warning is fine.

johnwebdev’s picture

Issue tags: +Needs tests
johnwebdev’s picture

This can be solved by that we ensure the pending revision menu link (the stored value) matches the current menu plugin definition when saving. But this should only happen if the menu link is moved through the Menu UI. So maybe a warning is fine.

I don't think it is as simple as this. I think for now we should disable the ability to rearrange menu items if there are items with pending revisions until we can come up with a better strategy, and handle that in a follow up.

johnwebdev’s picture

vuil’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

I move the issue into 2.0.x-dev branch.

  • vuil committed f42f1bd on 2.0.x authored by johnwebdev
    Issue #3092566 by johnwebdev, vuil: Incompatible with Content Moderation
    
vuil’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.