Closed (outdated)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2011 at 21:41 UTC
Updated:
19 Aug 2025 at 12:05 UTC
Jump to comment: Most recent
Comments
Comment #1
yannickooSubscribing
Comment #2
rogical commented+1 same issue on D7 version
Comment #3
rogical commentedI just find a temp solution: set the 'NO RESULTS BEHAVIOR' in the view.
Comment #4
quicksketchWe could probably avoid this problem by using $flag->applies_to_content_id() instead of flag_access_multiple(). Right now each "Flag" link requires a node load anyway (per #404150: Improve performance of the "Ops" field in Views), so using applies_to_content_id() to determine if the link should be displayed would be more accurate than using an access check.
For now an easy work-around is to use the Views ability to customize the empty text when a field has no value.
Comment #5
joachim commentedComment #6
steveoliver commentedI just opened an issue (#1913240: Hide flag link from views rows when hook_flag_access returns false), maybe it's the inverse of the problem here.
Comment #7
linus79 commentedYou can use Global:PHP
<?php print flag_create_link('bookmarks', $node->nid); ?>Comment #8
turbogeek commentedImplementing hook_flag_access_multiple() worked. Thanks steveoliver!
Comment #9
ivnishClosed as outdated because Drupal 7 is EOL