Skip to content

launchSearchPage() does not work correctly after upgrading to Spartacus 2211.41.0 #20523

@williampaciaroni

Description

@williampaciaroni

After upgrading to Spartacus 2211.41.0 and Angular 19, the launchSearchPage() method used by the SearchBoxComponentService no longer behaves as expected.

On the first search attempt, nothing happens — no navigation occurs and no results are displayed.

From the second search onward, the search page is shown, but it displays results for the previous query, not the one just entered.

Steps to Reproduce

  1. Upgrade Spartacus to 2211.41.0 and Angular to 19.x.
  2. Use a search bar based on SearchBoxComponentService.
  3. Type a query (e.g., "shoes") and submit the search.
  4. Nothing happens — no navigation or result update.
  5. Type a second query (e.g., "pants").
  6. The search page opens, but shows results for the first query ("shoes").

Expected Behaviour
Each call to launchSearchPage() should immediately trigger a search and navigate to the results page with the correct query.

Actual Behaviour
The first call to launchSearchPage() has no effect. Subsequent calls navigate to the search page but display results from the previous query.

Environment

  • Spartacus: 2211.41.0
  • Angular: 19.x

Previously working version: 2211.32.1

Involved component: SearchBoxComponentService

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