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.

Comments

john franklin’s picture

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.)

agentrickard’s picture

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:

    $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.

bluegeek9’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 6 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support of this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project, including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.