Domain Source ID views handler should say "Active domain" when domain_id == DOMAIN_SETTINGS_ALL_DOMAINS or else not emit an empty link, breaking the empty field handling.

How to repeat:
Create a view, add the "Domain Source: Domain Source ID" field, select the "link to sitename" option, set some alternate empty text, include a record with a source domain of "use active domain". Observe the resulting records shows nothing on screen, and the HTML is an empty A tag.

Files: 

Comments

StatusFileSize
new885 bytes

Attached patch shows "-5" if neither "link to sitename" nor "link to id" are selected, "-5" with a link to the node if "link to id" is selected or "Active domain" linked to the node if "link to sitename" is selected.

(Really, there should be a way to show "Active domain" without a link, but I don't feel like rewriting all the options.)

Status:Needs review» Needs work

This doesn't look right to me, because the $domain['path'] value won't be contextual.

Perhaps the problem is higher up:

<?php
    $domain_id
= $values->{$this->field_alias};
   
$domain = domain_lookup($domain_id);
    if (empty(
$domain)) {
      return;
    }
?>

That domain_lookup() should return -1 if the value is all domains.