Closed (outdated)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2012 at 07:28 UTC
Updated:
18 Aug 2025 at 10:18 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedThis is caused by assumptions this field handler makes. It assumes that it is on a relationship to the flagging table from the entity type base, so for example node-->flagging, or term-->flagging. However, in this context we are using it on users-->flagging BUT where the relationship table is about 'the user who made the flagging', and NOT 'the user who is flagged'.
This handler tries to add the relevant entity ID db field for the base table it assumes exists, so for example if the flag in question is a node flag, the handler tries to add (base).nid, which of course fails because the base is {users}.
So the fix could be to make this handler aware of this special case, when it's on the specific 'user's flaggings' handler.
But I don't actually see there is any point in doing this, because there is no way in a view of this kind to actually **see** what the flagged entity actually is. That's because we don't have a relationship from the flagging table to the flagged entity base table, and hence we can't get the entity title (or indeed any of its properties or fields). So even if we fixed this issue, you'd get 'flag/unflag this' links which are meaningless!
Hence marking as postponed, until #1694956: define a views relationship from {flag_content} towards entities is taken care of -- which would allow the relationship to the entity and hence this link field to be useful.
In the meantime, this field shouldn't be allowed on the 'users' flagged content' relationship, since it produces this errors: #1807876: prevent Flag link field being added on a 'User's flagged content' relationship.
Comment #2
ivnishClosed as outdated because Drupal 7 is EOL