Flagging 'delete-form' link is not connected to its route

Created on 24 August 2020, over 4 years ago
Updated 19 February 2025, about 2 months ago

Problem/Motivation

The flagging entity defines a 'delete-form' link at /flag/details/delete/{flag}/{entity_id}. However, calling this route through $flagging->toUrl('delete-form') results in an error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.flagging.delete_form" does not exist.

Proposed resolution

The unflag confirm route is defined in flag.routing.yml as flag.confirm_unflag. Update the route name so it matches the expected route name by the Entity API.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

The flag.confirm_unflag route name is moved to entity.flagging.delete_form.

Data model changes

None.

📌 Task
Status

Needs work

Version

4.0

Component

Flag core

Created by

🇳🇱Netherlands idebr

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024