I am developing under Drupal 7 dev (CHANGELOG.txt version is 1.372, created at 01:10:37 on 2010/Sep/16). I added a Users flag to create a user relationship functionality similar to Twitter's "Follow". But it didn't add anything to the profile page of any given user account.

It turned out that flag_user_view function uses "value" parameter to add Flag data to an user account, at line 659. I solved my problem (at least it seems so for the last several minutes) by changing "value" to "markup".

Comments

mooffie’s picture

Status: Needs review » Needs work

Thanks for the report.

There are a few more places where we use #value. It should be #markup in D7.

mooffie’s picture

Status: Needs work » Closed (fixed)

I committed a fix (replacing two occurrences of #value):
http://drupal.org/cvs?commit=439064

mooffie’s picture

Title: Users flag doesn't add anything to the profile page » #value renamed to #markup in D7
Priority: Critical » Normal
Status: Closed (fixed) » Active

However, there are two more places where there's #value that has to be changed:

flag_handler_relationships.inc - I want the D6 and D7 versions to be the same, so I'll probably replace this with a drupal_set_message().

flag.actions.inc - I wonder if this file was ported to D7 at all. I'll have to investigate this.

mooffie’s picture

flag.actions.inc - I wonder if this file was ported to D7 at all. I'll have to investigate this.

I opened a separate issue for this: #947392: D7: Make Actions/Trigger work

mooffie’s picture

Status: Active » Fixed

flag_handler_relationships.inc - I want the D6 and D7 versions to be the same, so I'll probably replace this with a drupal_set_message().

While it's possible to use drupal_set_message() there, it won't exactly mimic what we already have there. So I decided to just replace #value with #markup.

Committed:
http://drupal.org/cvs?commit=439086

aiwata55’s picture

Thank you so much for your quick fix!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.