Closed (fixed)
Project:
Flag
Version:
7.x-3.6
Component:
Flag core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2015 at 17:14 UTC
Updated:
7 Apr 2015 at 17:41 UTC
Jump to comment: Most recent
I have a node with two separate flag link generated via flag_create_link(), with javascript toggle:
flag_create_link('heart_this', $node->nid);
flag_create_link('qc_no_problems', $node->nid);
When I click the "qc_no_problems" flag link, it updates as expected to show the "unflag text," but the problem is that the "heart this" link is also replaced with the unflag link for the "qc_no_problems" flag. See screenshot:

I've tried embedding the second flag in a block, tested with the default "bookmarks" flag, and still having the same problem. Any ideas on what's causing this?
| Comment | File | Size | Author |
|---|---|---|---|
| multi_flag_problem.png | 249.42 KB | jordanmagnuson |
Comments
Comment #1
jordanmagnuson commentedInteresting: the problem turned out to be in my implementation of hook_flag_flag, where I accidentally had an assignment operator rather than an equality check:
Problem:
$flag->name = 'heart_this'should be$flag->name == 'heart_this'Comment #2
jordanmagnuson commented