LogicException: The entity is not flagged by the user. in Drupal\flag\FlagService->unflag() (line 340 of modules/contrib/flag/src/FlagService.php).

Created on 30 May 2022, almost 3 years ago
Updated 19 February 2025, about 2 months ago

Problem/Motivation

If the same flag is deleted by the same user.

Steps to reproduce

- One page is open in one tab and the same page is open is other tab.
- If the user deletes/unflag a flag from one tab. Sometime later the same user tries to delete/unflag the same flag from other tab.
- The error is shown.

Proposed resolution

Right now the code is directly throwing the error instead of handling it.
Use try catch to handle the error.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Needs work

Component

Flag core

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia gg24

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.

Sign in to follow issues

Merge Requests

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