Problem

  1. I have an entity type which has an optional user reference property (name uid, type integer).
  2. Entity API adds the relationship handler to said field so we can left join the {users} table.
  3. Upon left joining, I have some rows with an empty uid
  4. Using the "User: Name" field will return "Anonymous" instead of nothing

Cause

The field handler views_handler_field_user_name does not take into account that the UID may be NULL

Solution

Make the handler respect NULL values

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kristiaanvandeneynde created an issue. See original summary.

kristiaanvandeneynde’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.21 KB

The code in that handler could use a bit more love, but this'll do.

johnennew’s picture

Status: Needs review » Reviewed & tested by the community

Works as described

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2960871: Plan for Views 7.x-3.23 release

Committed. Thanks.

Status: Fixed » Closed (fixed)

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