There is a wrong token listed in the token replacement list to get the counter value for comment flags.

If you have a comment flag "goodcomment", you will get this token in the list:

[comment:node:flag-goodcomment-count]

It won't work. It's necessary to remove "node" part and then it's outputting the correct number:

[comment:flag-goodcomment-count]

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

I don't see any tokens like that. Can you export your flag please?

1mundus’s picture

No problem.

$flags = array();
// Exported flag: "Good Comment".
$flags['goodcomment'] = array (
  'content_type' => 'comment',
  'title' => 'Good Comment',
  'global' => '0',
  'types' => 
  array (
    0 => 'comment_node_TYPE',
    1 => 'comment_node_TYPE',
    2 => 'comment_node_TYPE',
  ),
  'flag_short' => '+ ([comment:flag-goodcomment-count])',
  'flag_long' => 'Good Comment',
  'flag_message' => 'Comment flagged under Good Comments',
  'unflag_short' => 'Unflag ([comment:flag-goodcomment-count])',
  'unflag_long' => 'Unflag ([comment:flag-goodcomment-count])',
  'unflag_message' => 'You have unflagged this comment,
  'unflag_denied_text' => '',
  'link_type' => 'toggle',
  'roles' => 
  array (
    'flag' => 
    array (
      0 => '2',
    ),
    'unflag' => 
    array (
      0 => '2',
    ),
  ),
  'weight' => 0,
  'show_on_form' => 0,
  'access_author' => 'comment_others',
  'show_on_comment' => 0,
  'api_version' => 2,
);
return $flags;