Starting from 1st April 2023, Shopify rolled out a change that broke our theme Impact. What is happening is that we were using the {{ 'now' | date: '%N' }} filter in Liquid to generate a unique ID (%N being nanoseconds and allows to have a unique ID each time it is called).
Unfortunately, Shopify seems to have broke this, with the same date being returned all the time, which lead to no longer generate unique ID. We are currently working with Shopify to hope that they can restore the old behavior to prevent breakage.
To fix this, we need to change the logic in various files. This document shows the various changes:
Replace (around line 23):
{%- capture id -%}checkbox-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture id -%}checkbox-{{ section.id }}-{{ form }}-{{ context}}-{{ name | handle }}-{{ value | handle }}{%- endcapture -%}
Replaces:
{%- capture quick_buy_id -%}quick-buy-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture quick_buy_id -%}quick-buy-{{ section.id }}-{{ product.id }}{%- endcapture -%}
Replaces (around line 27):
{%- capture id -%}input-{{ section.id }}-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture id -%}input-{{ section.id }}-{{ form }}-{{ name | handle }}{%- endcapture -%}
Replaces:
{%- capture localization_form_id -%}localization-form-{{ 'now' | date: '%N' }}{%- endcapture -%}
{%- capture localization_popover_id -%}popover-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture localization_form_id -%}localization-form-{{ type }}-{{ popover_vertical_position }}-{{ section.id }}{%- endcapture -%}
{%- capture localization_popover_id -%}popover-localization-form-{{ type }}-{{ popover_vertical_position }}-{{ section.id }}{%- endcapture -%}
Replaces (around line 105):
{%- capture quick_buy_id -%}quick-buy-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture quick_buy_id -%}quick-buy-{{ section.id }}-{{ product.id }}{%- endcapture -%}
Replaces (around line 174):
{%- capture name -%}swatch-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture name -%}swatch-{{ section.id }}-{{ product.id }}-{{ product_option.position }}{%- endcapture -%}
Replaces (around line 21):
{%- capture id -%}select-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture id -%}select-{{ section.id }}-{{ form }}-{{ name | handle }}{%- endcapture -%}
Replaces (around line 36):
{%- capture id -%}swatch-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture id -%}swatch-{{ section.id }}-{{ form }}-{{ context }}-{{ name | handle }}-{{ value | handle }}{%- endcapture -%}
Replaces (around line 74):
{%- capture popover_id -%}popover-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture popover_id -%}popover-variant-picker-{{ section.id }}-{{ product.id }}-{{ option.position }}{%- endcapture -%}
Replaces (around line 3):
{%- capture promo_id -%}{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture promo_id -%}{{ mega_menu_block.id }}{% if is_navigation_drawer %}-drawer{% endif %}-{{ link_col }}{%- endcapture -%}
Replaces (around line 220):
{%- capture carousel_id -%}promo-carousel-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture carousel_id -%}promo-carousel-{{ promo_id }}{%- endcapture -%}
Replaces (around line 20):
{%- capture id_prefix -%}facets-{{ section.id }}{%- endcapture -%}
By:
{%- capture context -%}{% if update_on_change %}sidebar{% else %}drawer{% endif %}{%- endcapture -%}
{%- capture id_prefix -%}facets-{{ context }}-{{ section.id }}{%- endcapture -%}
Replaces (around line 49):
{%- render 'checkbox', type: 'radio', label: option.name, name: 'sort_by', value: option.value, checked: checked -%}
By:
{%- render 'checkbox', type: 'radio', label: option.name, name: 'sort_by', value: option.value, checked: checked, context: context -%}
Replaces (around line 103):
{% render 'swatch' with 'color', allow_multiple: true, selected: filter_value.active, value: filter_value.label, name: filter_value.param_name, disabled: disabled, show_tooltip: true %}
By:
{% render 'swatch' with 'color', allow_multiple: true, selected: filter_value.active, value: filter_value.label, name: filter_value.param_name, disabled: disabled, show_tooltip: true, context: context %}
Replaces (around line 120):
{%- render 'checkbox', label: label, name: filter_value.param_name, value: filter_value.value, checked: filter_value.active, disabled: disabled -%}
By:
{%- render 'checkbox', label: label, name: filter_value.param_name, value: filter_value.value, checked: filter_value.active, disabled: disabled, context: context -%}
Replaces (around line 44):
{%- capture id_prefix -%}facets-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture id_prefix -%}facets-{{ section.id }}{%- endcapture -%}
Replaces (around line 115):
{%- capture checkbox_id -%}checkbox-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture checkbox_id -%}checkbox-{{ section.id }}-{{ filter_value.param_name }}-{{ forloop.index }}{%- endcapture -%}
Replaces (around line 133):
{%- capture sort_by_popover_id -%}popover-{{ 'now' | date: '%N' }}{%- endcapture -%}
By:
{%- capture sort_by_popover_id -%}popover-sort-by-{{ section.id }}{%- endcapture -%}
When i saw the E-Mail i thought it was a april fool.