Problem/Motivation

In some situations, when a user wants to change the menu structure, the drag handles are unavailable, and the following message appears:

Main navigation contains 3 menu links with pending revisions. Manipulation of a menu tree having links with pending revisions is not supported, but you can re-enable manipulation by getting each menu link to a published state.

Steps to reproduce

?

Proposed resolution

Improve the messaging so that the user knows which menu links have pending revisions

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3566062

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

malcomio created an issue. See original summary.

malcomio’s picture

Looking at the history of the code for the message, it comes from #2880152: Convert custom menu links to be revisionable

In my case, I'm not sure how the menu ended up in this state.

It isn't obvious from the UI how an editor can set revisions on menu links, and even looking in the database it's not straightforward to work out which links are causing the problem.

Digging further into the code, I can see that classes are added "color-warning menu-link-content--pending-revision", so the problematic links are styled, but it isn't very obvious, especially if the menu has a lot of links.

Perhaps the message could link down to the relevant menu items?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

rob230’s picture

Is it happening if the content has a pending revision, it creates a pending content menu link revision?

I agree that this warning message is unhelpful. On one site I maintain there are hundreds of links in the main menu tree, and there is no way to know which one is the problem. I ran some custom code to find out and it was a link to a published node which has some pending draft revisions. But the thing is, the draft isn't ready to go live, but the editors still want to be able to change the position of other menu links.

I think at the very least there needs to be a page which shows which menu links have pending revisions.

rob230’s picture

Here's a very basic starting point. It just adds the problematic menu items in a bullet list on the same page.

Example:
example bullet list

This was done against Drupal 11.2.

darby3’s picture

I just ran into an issue like this; the patch above helped track down the problematic page (on a local instance of the site). Patch applies cleanly on 11.4.10.

malcomio’s picture

I've put the changes from @rob230's patch into a merge request: https://git.drupalcode.org/project/drupal/-/merge_requests/17674/diffs

See https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr... for background on patches being deprecated