Allow flagging/unflagging by UUID

Created on 11 January 2021, about 4 years ago
Updated 19 February 2025, about 2 months ago

Problem/Motivation

When using JSON:API, it's much easier to use the UUID than the Drupal node ids. However, the Flag module currently requires the Drupal internal id to flag/unflag, which makes it more complicated to build flagging links.

Steps to reproduce

Proposed resolution

It would be great if there was support for UUIDs like this:

http://example.com/flag/confirm/unflag/my_flag/6aa13a73-09ab-498c-94d0-e...

Remaining tasks

User interface changes

API changes

It will become possible to use the UUID (instead of the drupal internal entity id) for flagging/unflagging.

Data model changes

Feature request
Status

Needs work

Version

4.0

Component

Flag core

Created by

🇯🇵Japan ptmkenny

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

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

  • 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.

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