How can I fix product filter errors in my header?

Topic summary

A user is attempting to relocate product filters from a product section to the header of their Shopify store. While the filtering functionality works, two error messages appear when trying to retrieve product counts and display active filters.

Key Issues:

  • Errors occur specifically when accessing product count data
  • Active filters are not displaying correctly
  • The URL refresh mechanism only works for the product section, not when filters are in the header

Technical Context:
The user has made code changes to move the filters but suspects the refresh URL is tied to the original product section location. Three screenshots are referenced showing the errors and implementation, though the specific error messages aren’t detailed in the text.

Status: The issue remains unresolved with no responses yet.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hi, i need to put filters from product section in header. I did all changes and filtering is working but i get 2 error messages when i’m trying to get products count and active filters. The reason is that it get url to refresh only for product section but filters are no longer in this section. How i can fix it?

Screenshot_30.png