When using apachesolr_term with apachesolr_multilingual, the following error is shown (multiple times, once for every vocabulary on the site) when trying to index data:
Undefined property: stdClass::$language in apachesolr_multilingual_fields_default_indexing_callback_implementation() (line 20 of /var/www/clients/client2/web93/web/sites/all/modules/apachesolr_multilingual/apachesolr_multilingual.index.inc).
Versions:

  • Drupal 7.34
  • apachesolr-7.x-1.7+2-dev (latest dev)
  • apachesolr_multilingual-7.x-1.2 (latest stable)
  • apachesolr_term-7.x-1.x-dev (latest dev)

Comments

ajaynimbolkar’s picture

StatusFileSize
new665 bytes

Hi Frm,

This warning coming from apachesolr_multilingual.index.inc file where in term indexing its not getting language parameter and it showing multiple warning.

Thanks,
Ajay Nimbolkar

ajaynimbolkar’s picture

Status: Active » Needs review
ajaynimbolkar’s picture

Priority: Normal » Major
ajaynimbolkar’s picture

Priority: Major » Critical
rudolfbyker’s picture

Project: Apachesolr Term » Apache Solr Multilingual
Status: Needs review » Reviewed & tested by the community

The issue is that some entities (like taxonomy terms) don't have the language property. I've been using this patch for years, and it works just fine. However, this is a patch against the apachesolr_multilingual module, not against the apachesolr_term module. So I'm moving it to the right project, and marking it as "reviewed".

rudolfbyker’s picture

StatusFileSize
new747 bytes

This patch is the same as the previous, but with better indentation and clearer context.

rudolfbyker’s picture

Title: Not working with apachesolr_multilingual module » Handle entities without language property
Issue summary: View changes
StatusFileSize
new1.59 KB

Here is a patch with proper p1 formatting instead of p0.

rudolfbyker’s picture

StatusFileSize
new2.75 KB

Here is a combined patch for issues https://www.drupal.org/project/apachesolr_multilingual/issues/2381049 and https://www.drupal.org/project/apachesolr_multilingual/issues/2998996 if anyone needs it. I'm using it in my drush make file, since you can't apply both patches automagically without a little merge.

I'm also hiding the patches that failed to apply.

ajaynimbolkar’s picture

Can you please provide me credit of this