When flagging with a field entry, the global field is not saved to database.

CommentFileSizeAuthor
#3 flagging_global-3143606-3.patch504 bytestheterencechan

Issue fork flag-3143606

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

theterencechan created an issue. See original summary.

theterencechan’s picture

Title: missing global value when saving » missing global value when saving flagging with form field entry
theterencechan’s picture

StatusFileSize
new504 bytes
tr’s picture

Status: Active » Needs review

You have to set the status to "Needs review" when you post a patch so that the test bot will test it.

ptmkenny’s picture

Status: Needs review » Active

This issue is a duplicate of https://www.drupal.org/project/flag/issues/2920099. I'm not sure which to close, but people should be aware of the fact that there are two different efforts to solve the same problem.

ptmkenny’s picture

Status: Active » Needs review
interdruper’s picture

Status: Needs review » Reviewed & tested by the community

#3 fixes the issue.

Moreover, it fixes the side-effect error: "LogicException: The entity is not flagged by the user. in Drupal\flag\FlagService->unflag()" when a user that has permission to unflag but is not the user that flagged the entity, tries to unflag.

dimKarp’s picture

I tested #3 too and it works fine

ivnish’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll, +Needs tests

Needs reroll to MR, needs tests how it works

prem suthar made their first commit to this issue’s fork.

prem suthar’s picture

Status: Needs work » Needs review

Re-rolled The Patch #3 with The MR. Please review.

ivnish’s picture

Status: Needs review » Needs work

Still needs tests

tobiasb made their first commit to this issue’s fork.

tr’s picture

ivnish’s picture

Issue tags: -Needs reroll
niklp’s picture

This fix works fine and desperately needs to be committed. Day and a half lost wondering why anon can add as many flaggings as they want to an item that has already been flagged.

joachim’s picture

Priority: Normal » Critical

Yeah, global flags are totally broken with this link type.

deaom made their first commit to this issue’s fork.

deaom’s picture

Version: 8.x-4.x-dev » 5.x-dev
Status: Needs work » Needs review

Cherry picked the commit from 8.x and created a new MR for 5.x with an updated test. Ready for review.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

LGTM. Thanks!

klemendev’s picture

Glad to see this finally in lgtm state :)

  • ivnish committed 834ac115 on 5.x authored by deaom
    fix: #3143606 missing global value when saving flagging with form field...
ivnish’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs tests

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.