TypeError: Cannot access offset of type string on string in Drupal\\search_api\\Plugin\\views\\row\\SearchApiRow->render() L221.

Created on 22 August 2025, 19 days ago

Problem/Motivation

If we use in our Drupal search custom datasources, those may have no view modes so in the line https://git.drupalcode.org/project/search_api/-/blob/8.x-1.38/src/Plugin... it will throw a TypeError: Cannot access offset of type string on string

Steps to reproduce

Use a custom datasource within a Search view.

Proposed resolution

Ensure that the datasource config is an array to prevent the type error.

💬 Support request
Status

Active

Version

1.38

Component

General code

Created by

🇪🇸Spain alae.akalay Benalmádena

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

Comments & Activities

Production build 0.71.5 2024