Reviewed & tested by the community
Project:
Apache Solr Multilingual
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2014 at 15:08 UTC
Updated:
3 Jun 2016 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mkalkbrennerThe expression that causes the Warning is
(LANGUAGE_NONE == $document->ss_language && LANGUAGE_NONE == $entity->language)The documentation of function entity_language() says that it will return NULL instead of LANGUAGE_NONE.
But there're entities having LANGUAGE_NONE as value.
So this fix is not a quick fix but requires some more research.
Comment #2
joachim commentedI don't think it's actually all that complicated. Yes, the return value of entity_language() is odd.
However, what the code here in apachesolr_multilingual_apachesolr_index_documents_alter() is actually doing is trying to determine whether the entity is language-neutral or not:
For our purposes, both a NULL language and LANGUAGE_NONE neutral.
Here's a patch.
There are other language key issues that I'll file separately.
Comment #3
joachim commentedComment #4
stefan.r commentedPatch looks great and fixes the issue