To reproduce:

Create a Node view, filter on published nodes of a certain type.
Test it: the nodes show up fine, also if logged in as new user.

Add a (not global, node, correct node type added) Flag relationship.
Next add a filter, filtering on "Flags: Flagged False".

Now, if I login as a new user, that doesn't have any nodes, flags, or anything, the view is empty.
As soon as I save one node while logged in as this user, all the expected nodes in the view pop-up.

Unsure if this is related to any existing issue.

Comments

quicksketch’s picture

Category: bug » support
Status: Active » Fixed

You need to make sure you uncheck the box for "Include only Flagged content" when you set up your relationship. If this checkbox is checked Views does an INNER JOIN, instead of a LEFT JOIN, meaning that if no rows match you get nothing at all. A left join will return results even if the join doesn't match.

I've double checked this and modified the existing "bookmarks" view that comes with Flag with success.

- Edit the view "flag_bookmarks"
- Edit the relationship "Flags: bookmarks" and uncheck the box for "Include only flagged content"
- Add the filter for "Flagged: Not Flagged"
- Created a new user and visited /bookmarks. All content on the site appeared, since this user has not flagged anything yet.

Status: Fixed » Closed (fixed)

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