Hello,

I am not able to select a Flag in the Configure Relationship: Flags: counter in order to get the count of current flag. There is no drop-down to select from.

Any idea how to get round this will be appreciated.

Comments

joachim’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Status: Active » Postponed (maintainer needs more info)

There should be a set of radios in the settings pop-up for the relationship.

However, this doesn't show if there are currently no flags at all on that entity type. Might that be the case for you?

Ayran’s picture

Hi, thanks for your prompt reply.

I want to build a block view of "People who have liked this". I have a "Flags: User's flaggings" relationship where I am able to correctly select from the radios from my two flags. I have 2 fields - User: Name and User: Picture where I display without problem the users who have liked.

I have a contextual filter (user flagged content) Flags: Content ID.

What I want to have is also a number of likes: Likes: (2). I presume I need to have the relationship Flags: counter in order to do so. But when I add relationships "Flags: Flagging flag counter" or "Flags: User flag counter" there is no radios list to select a flag.

I may be doing something wrong. I currently learn Drupal through making errors :)

joachim’s picture

Category: Bug report » Feature request
Status: Postponed (maintainer needs more info) » Active

Ok so to summarize:

- your view is listing users
- the relationship 'Flags: User's flaggings' joins you to the flaggings table, limited to a particular flag.

The problem is that the counter flags are not for what you think they are. The counter relationship joins onto the entity being flagged. So you're seeing the User and the Flagging counter relationships, because your view has a User base and now has Flaggings available due to the relationship you've already got.

What you're trying to get is the counter for the entities that are flagged BY the flaggings. That relationship isn't available. It should be doable, but it'll need a new relationship definition writing, and possibly a new handler too.

Ayran’s picture

Oh, I see. Thanks for your kind reply. I have managed to come round this by adding another content block view just for the number and putting it next to the user block view. Don't know if it is correct, but it works.

joachim’s picture

Category: Feature request » Support request
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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