Possible Limitation with Theme Editor Data in Liquid (collection_list and Dynamic Inputs)

Topic summary

A developer is experiencing issues with Shopify’s Theme Editor not recognizing dynamically selected data from collection_list inputs in Liquid templates. Despite selecting collections in the Theme Editor and saving, settings.selected_collections consistently returns empty values.

Key findings from debugging:

  • Hardcoded collection handles work perfectly, confirming the Liquid logic is sound
  • The issue persists across multiple theme types, including free Shopify themes
  • Similar problems occur with other dynamic input types like product_list and text fields

Developer’s hypothesis:
Shopify’s Liquid may struggle with inputs defined dynamically at runtime by users (like collection_list or text fields), while pre-defined dropdown options with hardcoded values in the schema work reliably. This suggests Shopify might require all valid input options to be explicitly defined in advance for proper validation and processing.

Community response:
One user suggested using section.settings.selected_collections instead of settings.selected_collections when referencing schema settings from a section, and recommended using the handleize filter for proper string matching with the contains function.

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

Hi Shopify Community,

I’ve been facing an issue with the Theme Editor not recognizing certain inputs in Liquid. I believe the problem might be related to how Shopify handles dynamically specified data versus pre-defined options in the code.

Here’s the background:

I’m trying to display a promo banner on specific collection pages selected in the Theme Editor. The setup is as follows:

Schema Setup

{

“type”: “collection_list”,

“id”: “selected_collections”,

“label”: “Allowed Collections”,

“info”: “Select the collections where the promo banner will appear.”

}

Liquid Logic

{%- assign allowed_collections = settings.selected_collections | split: “,” -%}

{%- if allowed_collections contains collection.handle -%}

{% endif %}

The Issue:

The settings.selected_collections data from the Theme Editor is consistently empty when accessed in Liquid, even after selecting collections and saving. Debugging confirmed this:

Selected Collections: {{ settings.selected_collections }}

This always outputs an empty value, regardless of what I select in the Theme Editor.

Debugging I’ve Done:

  1. Static Values Work: If I hardcode collection handles in the Liquid code, the promo banner displays as expected. The logic itself works perfectly.

{%- assign allowed_collections = “collection-1,collection-2” | split: “,” -%}

{%- if allowed_collections contains collection.handle -%}

{% endif %}

This confirms the issue lies with settings.selected_collections.

  1. Tested with Other Inputs:

I tried using other types like product_list, but the data from the Theme Editor was also not recognized.

  1. Free Themes: I tested this logic with free Shopify themes and encountered the same issue, which suggests it’s not specific to a custom theme.

  2. Alternate Logic Works for Pre-Defined Options:

I’ve had a similar issue when working with country restrictions. For example:

-If I use a dropdown in the Theme Editor with pre-defined country options set in the schema (e.g., DE, US, FR), the Liquid code correctly recognizes the selection.

-If I use a text field in the Theme Editor to allow users to enter country codes dynamically (e.g., DE,US,FR), Shopify fails to recognize the input in Liquid.

My Hypothesis:

The problem might be that Shopify’s Liquid cannot reliably work with inputs that are dynamically defined by the user at runtime via the Theme Editor. If the available options for a setting (e.g., collection_list, text) are not explicitly defined in the schema or the code, Shopify seems to fail to process the data correctly.

For example:

-A dropdown with pre-defined options works perfectly because Shopify knows all valid inputs in advance.

-A text field or dynamically defined collection list seems to fail because Shopify cannot validate or process the input effectively.

Question:

  1. Is there a known limitation in Shopify where dynamically defined inputs (e.g., collection_list or text fields) are not processed correctly in Liquid?

  2. Is it necessary to pre-define all available options in the schema for Shopify to handle these inputs properly?

  3. If so, how can I create a flexible solution for scenarios where options (like collections or country codes) are not known in advance and need to be defined dynamically by the user?

This issue has been consistent across different themes (including free Shopify themes) and impacts key functionalities where dynamic user inputs are required. Any guidance or insights would be greatly appreciated!

Thank you!
Linus

Version: Enterprise-Version 1.4.2

@Linus_Paul if your are referencing the schema settings from the section, you should request them by using

{{ section.settings.selected_collections }}

Furthermore, if you are using the “contains” function using a handle, you should handleize the variable to have matching values.

{%- assign allowed_collections = "collection-1,collection-2" | split: "," -%}
{% for collection in allowed_collections %}
{% assign collection_handle = collection | handle %}
  {%- if collection_handle == collection.handle -%}
    Banner
  {% endif %}
{% endfor %}