Comments

ezra-g’s picture

ezra-g’s picture

It looks like the results, when filtered, are being served with a different view mode.

japerry’s picture

grr, after hacking on this for a bit, putting the template back in doesn't show results in the original format. Need to extend the grid view into whatever display mode the search results are returning.

Zarabadoo’s picture

Looking at this makes me think Ezra's theory about the view mode is correct. Even if a template was missing, it should only be putting out the fields declared in the view mode. For some reason it is getting the entire profile.

Zarabadoo’s picture

StatusFileSize
new910 bytes

There was a typo in commons_search commit 044ec32380b404628c8c6d33f62a82d96e600c64. I have it committed and ready to push as soon as maintenance is finished. For now, the attached patch should also work.

japerry’s picture

Status: Active » Reviewed & tested by the community

Looks good. Took a while to see that typo!

ezra-g’s picture

Status: Reviewed & tested by the community » Needs work

On the people page, I'm seeing:

Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 170 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).
Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 171 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).
Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 172 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).
Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 170 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).
Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 171 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).
Notice: Trying to get property of non-object in commons_search_solr_user_user_view_alter() (line 172 of /mnt/www/html/commonsint/docroot/profiles/commons/modules/contrib/commons_search/modules/commons_search_solr_user/commons_search_solr_user.module).

japerry’s picture

Status: Needs work » Needs review

Hmm this is a different problem.

its within this function of commons_search_Solr_user, and I don't think related.

foreach ($build['#account']->og_user_node[LANGUAGE_NONE] AS $og_node) {
$gnode = node_load($og_node['target_id']);
$groups['group-item group-' . $gnode->nid] = array(
'title' => $gnode->title,
'href' => 'node/' . $gnode->nid,
'attributes' => array(
'class' => array('group-link'),
),
);
}

japerry’s picture

StatusFileSize
new3.74 KB

This patch adds some conditionals around edge cases where the search index might not be totally in sync with the site. While some content might look odd if its data is deleted, at least it shouldn't throw notices anymore.

japerry’s picture

Status: Needs review » Reviewed & tested by the community

I've been able to eliminate a few notices and errors caused with this commit and I can't find any other issues in testing. Marking as fixed, although who knows what other edge cases people will find. I think either way this is a step in the right direction. :-)

http://drupalcode.org/project/commons.git/commit/6dd7b6f

ezra-g’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, japerry! Marking as fixed.

Status: Fixed » Closed (fixed)

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