Hello,

I found an issue with the indexing of data from backreferenced entities.
This is similar to the issue "Reference fields are indexed in wrong language" (https://www.drupal.org/node/2567735). But while that is about entity references from the indexed entity. My issue is with entities that link to the indexed entity.

E.g
I am using Drupal Commerce.
I have set up a node type called "Product Display" that has an entity reference to a product type called "Product Variation".
My index is on the "Product Variation". Using Commerce Search API, I am using the "backreference Entity API properties". This allows me to retrieve the product display from the product variation.

The problem is while the correct product display is being indexed with the product variation, the product display data is always in the site's default language.

Using "Reference fields are indexed in wrong language" (https://www.drupal.org/node/2567735) as a reference I put in a possible solution to making sure the correct language is used for a backreferenced entities.

Please checkout the patch and see if it is suitable.

Thanks

Comments

shi99 created an issue. See original summary.

shi99’s picture

Status: Active » Needs review
StatusFileSize
new678 bytes
pobster’s picture

This is a duplicate of: https://www.drupal.org/node/2567735

pobster’s picture

Status: Needs review » Closed (duplicate)
pobster’s picture

Status: Closed (duplicate) » Needs review

OMG ... sorry! This is NOT a duplicate at all... Re-opening, this is very relevant!