How to add a flag link to a view that contains only fields with relationships Normally one would add a flag link as field in a view, in order to be able to flag an entity of a views row.

However, I cannot add a flag link to a view that only shows entities using a relationship, since the flag link already uses its own relationship and apparently cannot have another relationship on top of that.

So the question is, how can I add a flag link so that it will flag entities in views rows that use a relationship?

My case:
I have a view based on entities of bundle 'project'. I have added a contextual filter that selects only the currently viewed project entity.
I have added fields of project content that reference the current project, using the entity reference field 'field_project'.
The view shows all content referencing the currently viewed project.
However, the flag that I add to the view does not flag the project content, but the viewed project. Result is that if I press one flag link, all flags appear as flagged in the view.
Quote from your own comment:


  I removed the flag, and re-added it, and suddenly the relationship field is available in the flag. The funny thing is that the flag was already present when I changed the view to only contain related entities, and when I tried to edit the flag relation properties, it did not give a field to add a relationship. Removing and readding the flag did help.


So it seems that "removing and readding the flag" is the solution to answer your question.

Credits: Yuri and Niall Murphy.