Deleting a node when a view has a menu: Tab with normal menu link parent results in redirect to the delete node page

Created on 6 October 2023, over 1 year ago
Updated 19 October 2023, over 1 year ago

If you create a view with a Page and Tab menu with a parent, deleting a node results in the node being deleted and the browser redirecting to /node/{nid}/delete. Clicking delete on this page results in a 404 because the node is already deleted.

Edit: I've just noticed that there are some views where this works, so I'm unsure what triggers it. It could be having an invalid menu name or something along those lines. My menu settings for one that causes this issue are as follows, though note that creating a view with pretty much any text in the title/description fields of these menu settings causes the issue:

display_options:
      path: users
      show_admin_links: false
      menu:
        type: 'default tab'
        title: List
        description: 'Find and manage people interacting with your site.'
        menu_name: admin
        weight: -10
        context: ''
      tab_options:
        type: normal
        title: People
        description: 'Manage user accounts, roles, and permissions.'
        menu_name: admin
        weight: 0
      defaults:
        show_admin_links: false
      display_extenders: {  }
      display_description: ''

Steps to reproduce:
  1. Create a fresh install of Drupal using Composer.
  2. Create a view and add a page to it.
  3. In the page settings, under Menu, select "Default menu tab".
  4. On the "Default tab options" page of the modal, select "Normal menu link".
  5. Enter a title and a description.
  6. Click apply.
  7. Now create a piece of content.
  8. Navigate to /node/{nid}/edit for that piece of content.
  9. Click delete.
  10. In the popup, click delete.
  11. Instead of being redirected to the content page, you'll be redirected to the /node/{nid}/delete page for that node.

🐛 Bug report
Status

Needs work

Version

10.1

Component
Views 

Last updated about 3 hours ago

Created by

🇺🇸United States matt.schuh

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

Comments & Activities

Production build 0.71.5 2024