post-update hook throws error for 1.10

Created on 16 January 2025, 4 days ago

I've updated Search API Autocomplete from 1.9 to 1.10. Now drush updb throws the following error:

drush updb -y
--------------- ---------------- ------------- ------------------------------
 Module           Update ID        Type          Description
---------------- ---------------- ------------- ------------------------------
 search_api_aut   sort_dependenc   post-update   Sort Search API Autocomplete
 ocomplete        ies_order                      entity dependencies.
---------------- ---------------- ------------- ------------------------------

// Do you wish to run the specified pending updates?: yes.

[notice] Update started: search_api_autocomplete_post_update_sort_dependencies_order
[error]  The datasource with ID 'entity:media' could not be retrieved for index 'Allgemeine Suche'.
[error]  Update failed: search_api_autocomplete_post_update_sort_dependencies_order
[error]  Update aborted by: search_api_autocomplete_post_update_sort_dependencies_order
[error]  Finished performing updates.

My index config does not specify 'media' as datasource, just 'content' (nodes). So why does it try to use 'entity:media'?

๐Ÿ› Bug report
Status

Active

Version

1.10

Component

General code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany drubb Sindelfingen

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

Comments & Activities

  • Issue created by @drubb
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany drubb Sindelfingen

    The config for the particular index:

    uuid: 02b8eac8-e115-4dcf-992b-208c2ae7f2aa
    langcode: de
    status: true
    dependencies:
      config:
        - field.storage.node.field_content
        - field.storage.node.field_teaser
        - search_api.server.elasticsearch
      module:
        - node
    id: search
    name: 'Allgemeine Suche'
    description: ''
    read_only: false
    field_settings:
      field_content:
        label: Langfassung
        datasource_id: 'entity:node'
        property_path: field_content
        type: text
        dependencies:
          config:
            - field.storage.node.field_content
      field_teaser:
        label: Kurzfassung
        datasource_id: 'entity:node'
        property_path: field_teaser
        type: text
        dependencies:
          config:
            - field.storage.node.field_teaser
      title:
        label: Titel
        datasource_id: 'entity:node'
        property_path: title
        type: text
        boost: 2.0
        dependencies:
          module:
            - node
      type:
        label: Inhaltstyp
        datasource_id: 'entity:node'
        property_path: type
        type: string
        dependencies:
          module:
            - node
    datasource_settings:
      'entity:node':
        bundles:
          default: true
          selected:
            - blogpost
            - editorship
            - playlist
        languages:
          default: true
          selected: {  }
    processor_settings:
      add_url: {  }
      aggregated_field: {  }
      custom_value: {  }
      entity_status: {  }
      entity_type: {  }
      highlight:
        weights:
          postprocess_query: 0
        prefix: '<strong>'
        suffix: '</strong>'
        excerpt: true
        excerpt_always: true
        excerpt_length: 256
        exclude_fields:
          - title
        highlight: always
        highlight_partial: true
      html_filter:
        weights:
          preprocess_index: -15
          preprocess_query: -15
        all_fields: true
        fields:
          - field_content
          - field_teaser
          - title
          - type
        title: true
        alt: true
        tags:
          b: 2
          h1: 5
          h2: 3
          h3: 2
          strong: 2
      ignorecase:
        all_fields: true
        fields:
          - field_content
          - field_teaser
          - title
          - type
      language_with_fallback: {  }
      rendered_item: {  }
      type_boost:
        weights:
          preprocess_index: 0
        boosts:
          'entity:node':
            datasource_boost: 0.0
            bundle_boosts:
              news: 0.0
              page: 0.5
              series: 0.5
    tracker_settings:
      default:
        indexing_order: lifo
    options:
      cron_limit: 200
      index_directly: true
      track_changes_in_references: true
    server: elasticsearch
    
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States w01f

    I think we're getting the same error:

    "drush updb" gives:
    [error] Search API Autocomplete requires this module and version. Currently using
    Search API version
    (Currently using Unresolved dependency Search API (Version >= 8.x-1.20 required)
    )

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    Thanks for reporting this problem!
    Thatโ€™s really a doozy. Off the top of my head, I canโ€™t venture a guess why this would happen.
    Are you able to obtain a stack trace for the error? (It is thrown in \Drupal\search_api\Entity\Index::getDatasource().) That would help a lot.

    (In the future, however, please donโ€™t post config YAML as a comment, but instead use an attachment.)

    @w01f: That seems like an entirely different problem, namely that you have Search API installed via Git and Drupal unfortunately does not handle that correctly. It therefore incorrectly reports a dependency version conflict.

Production build 0.71.5 2024