Newly added menu links are invisible until published

Created on 4 April 2024, over 1 year ago
Updated 6 May 2024, about 1 year ago

Problem/Motivation

When adding a new menu link in a workspace, it does not show up in the UI until the change is pushed all the way to Live. It looks like that was supposed to be fixed in [3040258]. Note that renaming a link works as expected.

Steps to reproduce

Be in a workspace. Add a new menu link. See that it is not in the UI. Publish to Live. See that it is now visible in the UI.

Proposed resolution

Ensure that newly-created entities are marked as the default revision in \Drupal\workspaces\EntityOperations::entityPresave(), so that code like \Drupal\menu_link_content\Entity\MenuLinkContent::postSave() can run correctly for the initial revision created in a workspace.

Also, \Drupal\workspaces\EntityOperations::entityFormEntityBuild() needs to set the "new revision" flag to fully match what we're doing in ::entityPresave().

Remaining tasks

Review.

🐛 Bug report
Status

Fixed

Version

10.3

Component
Workspaces 

Last updated 9 days ago

No maintainer
Created by

🇺🇸United States michelle Wisconsin, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024