Call to a member function getPropertyDefinitions() on null in Drupal\search_api\Plugin\views

Created on 1 February 2024, 5 months ago
Updated 3 February 2024, 4 months ago

Problem/Motivation

During the search content indexing, we are getting a log errors like below

Error: Call to a member function getPropertyDefinitions() on null in Drupal\search_api\Plugin\views\field\SearchApiEntityField->expandRequiredProperties() (line 499 of /var/www/html/docroot/modules/contrib/search_api/src/Plugin/views/field/SearchApiFieldTrait.php).

Steps to reproduce

We need to check the drupal watchdog while indexing the content

Proposed resolution

??

๐Ÿ› Bug report
Status

Postponed: needs info

Version

1.31

Component

Plugins

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @Kavya N N
  • First commit to issue fork.
  • Merge request !106add not empty condition โ†’ (Open) created by suryabhi
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update 5 months ago
    Composer require-dev failure
  • Pipeline finished with Failed
    5 months ago
    Total: 47s
    #86649
  • Kavya N N โ†’ changed the visibility of the branch search_api-3418665 to hidden.

  • Pipeline finished with Failed
    5 months ago
    #86761
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update 5 months ago
    Composer require-dev failure
  • Pipeline finished with Failed
    5 months ago
    Total: 46s
    #86903
  • Status changed to Postponed: needs info 4 months ago
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    Thanks for reporting this problem!

    However, I have a couple of questions:

    1. Are you certain the problem occurs during indexing? As it relates to Views code, I would have assumed it would occur during searching.
    2. Even so, it seems pretty extraordinary that the Views plugin would not be able to determine the search index the whole view is based on, and this was the only place where this led to a problem. Can you determine in which view in particular this occurs (and why it would be executed during indexing)? Is it a Search API view?

    Finally, testing issue forks unfortunately still doesnโ€™t work in this project โ€“ see #3190024: Problem with test dependencies when testing issue forks โ†’ and ๐Ÿ“Œ (Try to) fix the GitLab CI RTBC for details. Therefore, we still have to work with patches for now.
    Attaching a revision of your changes that seems a bit more elegant, considering we are free to use PHP 8.1.

Production build 0.69.0 2024