Skip to content

[bug] Site search on https://www.aem.live is broken #1036

@sagarsane

Description

@sagarsane

The doc-search block crashes when searching on http://www.aem.live, throwing the following error:

  Uncaught TypeError: Cannot read properties of null (reading 'textContent')
      at getIdFromSectionMetadata (doc-search.js:264:99)
      at createSearchResultObject (doc-search.js:269:14)
      at doc-search.js:313:28
      at Array.forEach (<anonymous>)
      at findDoc (doc-search.js:311:13)
      at searchQuery (doc-search.js:371:30)

The issue occurs on http://www.aem.live but not on https://main--helix-website--adobe.aem.live.

Steps to Reproduce:

  1. Go to https://www.aem.live/
  2. Click on the search input or navigate to a page with the doc-search block
  3. Type a search query (e.g., "resources" or "guides")
  4. Observe the error in the browser console

Expected Behavior:

Search results should display without errors.

Actual Behavior:

JavaScript error is thrown, search functionality breaks.

Environment:

  • URL: http://www.aem.live (does not occur on main--helix-website--adobe.aem.live)
  • Browser: All browsers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions