Closed (outdated)
Project:
Flag
Version:
7.x-2.x-dev
Component:
Rules integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 11:10 UTC
Updated:
19 Aug 2025 at 12:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchUpdating title for accuracy. I haven't tried to use the flagging-user token in Drupal 7 yet, but if [flagging-user:name] works then it should work for all Field module fields also.
Comment #2
fagoThey are. I guess though the problem is that the global user object is taken, which is no full entity. Attached patch should fix it, please test.
Comment #3
fagoComment #4
quicksketchAh right. I actually just ran into this earlier this week that the global $user is not a full entity. Thanks for the patch, I imagine it should work, but if @dkliewer can confirm that would be great.
Comment #5
joachim commentedComment #7
drewish commentedLooks like the code has moved into flag_flag.inc but the fix still works. Here's a re-roll.
Comment #8
drewish commentedComment #9
joachim commentedThanks for the reroll. Committed to 3.x.
Comment #10
joachim commentedFixed on 7x-2x too.
Comment #11
joachim commentedHmmmmm hang on.
This is adding a full user_load() right at the top of the process, for tokens we might or might not need.
Would it not be better for performance to leave this off until Rules is invoked (if it exists)?
Similarly, when we replace our own tokens for our own labels, we lazy-load the flagging entity:
Should we not take the same approach for the user here?
Comment #12
joachim commentedHmmyup, on further reflection, I'm not happy with this fix. I don't think it's a good thing to be adding an extra entity load to the flag pathway, which is used on AJAX.
Reverting the commits.
Comment #14
ivnishDrupal 7 is EOL. Issue will be closed, but patches are still here