Shopify CLI 'theme dev' collection.filters returning as nil

I have reproduced the issue on the latest CLI version.

Yes, I am on the latest version

I have searched existing posts and this report is not a duplicate.

Yes, this isn’t a duplicate

In which of these areas are you experiencing a problem?

Theme

Expected behavior

collection.filters returns back consistent data

Actual behavior

Hiya,

So interesting issue.. when running shopify theme dev and viewing the site locally (127.0.0.1:9292) the collection.filters object in Liquid will just randomly return nil in-between page refreshes. After lots of refreshes, it just returns nil until I restart the CLI.

I’ve re-produced this on complete barebones theme, there doesn’t seem to be any logic to it i.e. it happens regardless of collections, product count, current filters etc.

There isn’t anything interesting in the verbose view either.

Reproduction steps

Run shopify theme dev
Go to a collection page (ensure theme uses filters)
Spam refresh until the filters disappear

Verbose output

N/A

Operating system

Windows 11

CLI version

3.91.0

Shell

N/A

Nodejs version

24.6.0

What language and version are you using in your application?

N/A

1 Like

Video here to demonstrate:

Wondering if its linked to these:

Interesting.. although this is just in Liquid :person_shrugging:

Hey @ceri_waters! Luke’s right, this is the same issue. Liquid collection.filters and the Storefront API filters share the same backend infrastructure, so both were affected.

A recent change on Shopify’s end was incorrectly skipping filter computation for some requests, which is why you were seeing nil intermittently. It has since been rolled back. Can you confirm filters are returning consistently now?

@Donal-Shopify I just found this thread because our team noticed the issue today. I upgraded to the most recent version of the CLI a few minutes ago, and the issue persists.

Hey @Donal-Shopify! I have a merchant with exact same issue but it only affects Liquid in his case. I’m able to reproduce it simply by switching location via VPN. In Spain collection.filters returns data correctly, in Germany and US it returns empty result. At the same time, Storefront API returns correct data in both case, so the problem only affects Liquid for him.

It seems like the issue is still not resolved. Could you please report it back to the team? If necessary, I can share more details on this case in DM and share reproduction screenshots and video.

Thanks for the additional reports, @Maria_Carter and @Kirill_Platonov. This is still happening and is related to the same underlying behavior I mentioned previously. Adjustments were made on the platform side, but they haven’t fully resolved it for all stores.

I’ve raised this with the team again and they’re aware of the continued reports. To investigate your specific cases, can you each share an x-request-id from an affected page load where the filters came back empty? You can grab it from the response headers in your browser’s network tab. That will let us trace the request on our end and apply a fix for your stores.

@Maria_Carter, are you seeing this on the live published theme or only through shopify theme dev?