search_api_et_solr_field_is_translatable generates a "Notice" when field_info is null (true for internal search ids)

Created on 7 March 2023, over 1 year ago

Problem/Motivation

When indexing translated nodes, an "id" field/pseudofield is used internally by solr / search_api_et_solr which generates the notice when passed through search_api_et_solr_field_is_translatable

Steps to reproduce

Index a translated node, note the following error in the log:

Notice: Trying to access array offset on value of type null in search_api_et_solr_field_is_translatable() (line 312 of /var/www/html/sites/all/modules/contrib/search_api_et_solr/search_api_et_solr.module).

This also causes the following error in field.multilingual.inc: Notice: Trying to access array offset on value of type null in field_is_translatable() (line 176 of /var/www/html/modules/field/field.multilingual.inc).

Proposed resolution

Patch the search_api_et_solr.module's "search_api_et_solr_field_is_translatable" function to return FALSE if field_info is null

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada wilco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024