Unable to index metatag

Created on 11 March 2025, about 1 month ago

When editing the index I get the following information

The following fields cannot be indexed since there is no type mapping for them:

    Metatags (type "metatag")
    Metatags (Hidden field for JSON support) (type "field_item:metatag_computed")

Before I was able to do this with Metatag >> Description.

๐Ÿ› Bug report
Status

Active

Version

1.38

Component

General code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain uridrupal

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

Comments & Activities

  • Issue created by @uridrupal
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    What do you mean with โ€œbeforeโ€? What exactly did you update (and from/to which version)?
    This seems more like a change in the Metatag module, not this one. Did you update Metatag, too, and does reverting that update restore the functionality?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States broeker

    We are also seeing this problem on an upgraded site, but we are unclear when the problem started -- we have likely upgraded both Metatag and Search API several times before the client noticed the issue. However:

    We previously had on our index, and this was used to provide heavily weighted search results on those keywords.

    The field remains in our index (as does the ability to "add" a new field_metatags entry) but none of them are actually indexed based on my review of the DB and the lack of any search results.

    Per the OP, we see this message when trying to add a field:

    Skipped fields
    The following fields cannot be indexed since there is no type mapping for them:
    Layout (type "layout_section")
    Metatags (type "metatag")
    Metatags (Hidden field for JSON support) (type "field_item:metatag_computed")
    If you think one of these fields should be available for indexing, report this in the module's issue queue. (Make sure to first search for an existing issue for this field.) Note that entity-valued fields generally can be indexed by either indexing their parent reference field, or their child entity ID field.
    

    We are currently running the latest releases of Metatag+Search API -- based on the wording it appears this might better belong in the Metatag queue.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain uridrupal

    @broeker Is spot on. It could be both the update of Search Api and Metatag the issue.
    So if downgrading works, then maybe it's related to Metatag.
    I cannot do further testing at the moment since I rolled out the changes without the Metatag indexing.

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

    OK, thanks for the further input. Based on this it does seem like a change in the Metatag module is the root cause of this. It seems like field_metatags was previously defined as having a complex data type, with child properties like keywords and description, but now uses a custom data type that is scalar and thus cannot be properly indexed. However, Iโ€™m not using the Metatag module myself so I cannot speak to the underlying reasons for those changes and what we can do about them.

    Moving this to the Metatag issue queue as it seems pretty likely that any fix for this would have to happen there, but not sure whether itโ€™s clear to anyone that doesnโ€™t have detailed knowledge of both Search API and Metatag internals what the proper fix here would be. Anyways, maybe some Metatag expert can still chime in here and we can figure this out.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom sittard

    Adding related issue: https://www.drupal.org/project/metatag/issues/3315049 โœจ Add new Search API processor plugin for more generic data indexing Needs review

Production build 0.71.5 2024