Flag entry forms do not have a proper 'Unflag' link

Created on 24 January 2023, almost 2 years ago
Updated 27 January 2023, almost 2 years ago

Problem/Motivation

Flags that use the 'Field Entry Form' Link Type option do not have a proper 'Unflag' link to display for removing the flagging. Currently, the unflag link points to the edit form for field entry.

Steps to reproduce

1. Create a Flag with the 'Field Entry Form' Link Type option and save the Flag.
2. Display the entities the Flag is attached to in a View.
3. Add a 'Flags' relationship to the View that has the description 'Limit results to only those entity flagged by a certain flag; Or display information about the flag set on a entity.'
4. Add a 'Flagging: Flag link' field to the View that has the description 'Display flag/unflag link.'
5. Perform the flag link action on an entity in the View
6. Perform the unflag link action on an entity in the View
7. Observe that the 'Unflag' action link points to the 'Field Entry Form' edit form instead of the delete form.

Proposed resolution

Use the delete form route instead of the edit form route for the unflag link action on Field Entry forms. Update the method 'FieldEntry::getUrl' to have an 'unflag' action case with the delete form route for Field Entry.

Remaining tasks

Approve a patch to add the 'unflag' action link option with the delete form route in the 'FieldEntry::getUrl' method.

User interface changes

None.

API changes

None.

Data model changes

The Field Entry 'unflag' link will point to the delete form instead of the edit form when using the 'Field Entry Form' Link Type option on a Flag.

πŸ› Bug report
Status

Needs review

Component

Flag core

Created by

πŸ‡ΊπŸ‡ΈUnited States gtucker6

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

Comments & Activities

Production build 0.71.5 2024