Entity menu link are not being updated when aliases change

Created on 17 May 2024, about 1 month ago
Updated 19 May 2024, 30 days ago

Problem/Motivation

Menu items to specific pieces of content are generated using the node alias.
When cache is enabled and alias is updated, the menu cache is not being invalidated, leading to broken links.

Steps to reproduce

  • Install a Drupal Standard site
  • Enable Drupal cache in /admin/config/development/performance and set it to 1 day
  • Create a basic page and set its alias to /foo
  • Create a new Menu Link in Main Navigation menu pointing to the node created using the autocomplete title. This is to force to store the URI in the database in format entity:node/XX instead of internal:/node/XX
  • Load homepage and confirm that menu link is added and points to /foo
  • Go to Url aliases page (/admin/config/search/path) and modify the node alias to /bar. This is to avoid invalidating node specific cache tags
  • Load homepage and confirm that menu cache has not been invalidated and link points to the previous alias, hence it is a broken link

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Menu link contentΒ  β†’

Last updated 30 days ago

Created by

πŸ‡ͺπŸ‡ΈSpain plopesc Valladolid

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @plopesc
  • Status changed to Needs review about 1 month ago
  • πŸ‡ͺπŸ‡ΈSpain plopesc Valladolid

    MR created.

    There is an, apparently, unrelated failing test. Will relaunch the test suite later.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 1642s
    #175031
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1082s
    #176361
  • Pipeline finished with Failed
    30 days ago
    Total: 969s
    #176396
  • Status changed to Needs work 30 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Left some comments.

    But issue summary appear to be incomplete. Believe proposed solution should be updated.

    Good find!

  • Pipeline finished with Failed
    29 days ago
    Total: 967s
    #176794
  • Pipeline finished with Success
    29 days ago
    Total: 605s
    #176919
Production build 0.69.0 2024