Hightlight excerpt does not support multilingual on some fields

Created on 28 November 2023, 12 months ago
Updated 17 September 2024, about 2 months ago

Problem/Motivation

General fields seems okay on multilingual but it appears there is problem on some special field types.

Steps to reproduce

Using Paragraphs as a field of node. Configure Highlight with excerpt in result. Search in multilingual, the result displays excerpt in default language instead of target language.

Proposed resolution

Root cause seems residing in

FieldsHelper::extractItemValues

      if ($missing_fields) {
        $this->extractFields($item->getOriginalObject(), $missing_fields);

When extracting fields for missing fields, it does not take langcode in account.

Remaining tasks

Add langcode when calling extractFields()

🐛 Bug report
Status

RTBC

Version

1.0

Component

General code

Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024