The last version of the domain module has this code in it.

    // Transform the 0 to -1, since {domain_access} is unsigned.
    ($data->gid == 0) ? $gid = -1 : $gid = $data->gid;

So if you query in the domain table for a domain matching the domain id -1, you will get no results.

In the attached patch I added a fix in domain_solr_domain_name() and theme_domain_solr_breadcrumb_im() to set the domain id to 0 if it is -1.

Also I removed some spaces and changed $group_id to $domain_id in theme_domain_solr_breadcrumb_im().

Comments

Yaron Tal’s picture

StatusFileSize
new1.64 KB

Seems like filtering on im_domain_id:-1 also doesn't work, so the above patch wasn't right, but we need to do the opposite in domain_solr_apachesolr_update_index().

Also I noticed a db_query_sql() which gave errors.
From the documentation:
Rewrites node, taxonomy and comment queries.

As it was used for the domain table, I removed it.

This patch should work.

Yaron Tal’s picture

Status: Active » Needs review
john franklin’s picture

The patch in #1 applied cleanly to a site I'm working on, and works as advertised.

Anonymous’s picture

Status: Needs review » Closed (fixed)

Committed. I'm making this a 1.0 release. Thanks for the patch!