If an entity reference to a user is left empty the view displays it as "Anonymous" rather than just leaving the output empty, this is caused by format_username() so can be worked around by disabling "Use formatted username", but this means when there are actually users they won't be formatted either.

CommentFileSizeAuthor
#6 views-2514694-6.patch653 bytesmustanggb
#3 views-2514694-3.patch651 bytesmustanggb

Comments

mustanggb’s picture

Component: Miscellaneous » user data
Status: Active » Needs work
mustanggb’s picture

mustanggb’s picture

Status: Needs work » Needs review
StatusFileSize
new651 bytes

And a patch.

Status: Needs review » Needs work

The last submitted patch, 3: views-2514694-3.patch, failed testing.

rasikap’s picture

Assigned: Unassigned » rasikap
mustanggb’s picture

Assigned: rasikap » Unassigned
Status: Needs work » Needs review
StatusFileSize
new653 bytes

Well empty() matches 0, which of course should return the anonymous user.
Manually edited to use the less inclusive is_null() instead.

mustanggb’s picture

Issue summary: View changes

Removing code from summary as there are patches now.

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

This feels like an appropriate change.

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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