Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | domain-views-handler-active-domain.patch | 885 bytes | John Franklin |
Comments
Comment #1
John Franklin CreditAttribution: John Franklin commentedAttached 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.)
Comment #2
agentrickardThis doesn't look right to me, because the $domain['path'] value won't be contextual.
Perhaps the problem is higher up:
That domain_lookup() should return -1 if the value is all domains.