Unable to delete individual messages from the operations menu

Created on 14 April 2025, 2 months ago

Problem/Motivation

Messages cannot be deleted from the dropdown menu in the "Operations" column (the View/Edit/Delete menu). Selecting delete gives a php error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "message.messages" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 211 of /var/www/foo/web/core/lib/Drupal/Core/Routing/RouteProvider.php).

Deleting by selecting the item with the checkbox and applying the bulk "delete" to the selected ones does work.

Steps to reproduce

1. Create a message
2. Try and delete it via the menu

πŸ› Bug report
Status

Active

Version

1.8

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States irandamay

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

Comments & Activities

  • Issue created by @irandamay
  • πŸ‡¨πŸ‡­Switzerland ayalon

    The message_ui depended on message.messages.

    This was broken in this commit:
    https://git.drupalcode.org/project/message/-/commit/036ef5228899717c0c8a...

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9
  • πŸ‡³πŸ‡±Netherlands ekes

    I'm guessing the intention here is to redirect to the admin list of messages? The old code linked to by @ayalon did use the view list route view.message.page_1. But of course that can be deleted/replaced etc. which would lead to this same issue.

    Options I can see here are:

    Maybe if there was a link template for collection defined, with some simple list, that can then overriden by the view, but there will always be the route. Then it could go to the collection list?

    Or easier redirect to the front page or admin page by default. And use the ?destination= on links from views etc. to redirect back.

    Not sure what the plans were? But switching either way would fix Drupal\message_ui\Form\MessageDeleteForm and Drupal\message_ui\Form\DeleteMultiple that both reference the non-existing message.messages

Production build 0.71.5 2024