Theme Editor Failed to Load Page

Topic summary

Theme editor fails to load for a specific theme with the message “Liquid error: memory limits exceeded,” while the storefront preview works and other themes load normally. A screenshot of the error and the theme.liquid file were shared.

Diagnosis and suggestions:

  • Likely triggered in Design (Customizer) mode, not in storefront preview. “Liquid” refers to Shopify’s templating language; memory errors can stem from heavy or infinite loops in snippets/sections.
  • Reviewer noted no obvious faults in theme.liquid, aside from a stray “#” in a script tag (likely unrelated) and the presence of a license verification render common in paid themes that could contribute.
  • Proposed steps: comment out render/sections blocks to isolate the culprit; try opening non-home pages in the editor via previewPath in the URL; back up the theme first. Possible Shopify-side issue given similar reports.

Outcome:

  • Original poster reported the editor started working again the same day without changes. Root cause undetermined.

Current status:

  • Other users report the same error persists (one for weeks) and say Shopify support sees no platform issue. Discussion remains open, no definitive fix identified.
Summarized with AI on December 13. AI used: gpt-5.

Hi Guys,

I have just gone to load the editor for my theme and getting the following issue (as attached).

It was all working fine when I was last editing last week, then all of a sudden getting this error.

I have not added or removed any apps or changed any code.

The website works fine in both Preview mode and if i try and load another theme in editor I do not get this issue. I have tried different browsers and devices and all getting the same problem.

It will not let me access any of the home page features to make an edit, so I cannot see what the problem is.

Thanks

Jamie

2 Likes

There is a hint at the top left – “Liquid error: memory limits exceeded”

It could be that some of it runs only in Design mode and this will explain why it works fine in preview.

Unfortunately, it’s hard to tell without seeing your liquid code.

Could be some nested loop processing huge data or simply infinite loop…

Hi Tim,

Thanks for that. I’ve attached my theme.liquid code.

{%- liquid
assign themeLayout = settings.theme_layout | downcase
assign defaultDesc = ‘general.meta.description’ | t: shop_name: shop.name
assign pageDesc = page_description | default: defaultDesc
-%}

{%- capture body_class -%}
|page-layout-{{ settings.page_layout -}}

{%- if themeLayout == ‘rtl’ -%}|theme-rtl{%- endif -%}
{%- if settings.enable_left_column -%}|has-left-column {%- endif -%}
{%- if settings.cart_type == ‘catalog’ -%}|catalog-mode{%- endif -%}

{%- case request.page_type -%}
{%- when ‘product’ -%}|template-product-{{ template.suffix | default: settings.product_page | replace: ‘.’, ‘-’ | replace: ‘/’, ‘-’}}
{%- when ‘page’ -%}|page-{{template.suffix}}
{%- else -%}|template-{{ template | replace: ‘.’, ‘-’ | replace: ‘/’, ‘-’ -}}
{%- endcase -%}
{%- endcapture -%}
{%- assign body_class = body_class | remove_first: ‘|’ | strip | strip_newlines | split: ‘|’ | join: ’ ’ -%}

{%- if settings.favicon == blank -%} {%- else -%} {%- endif -%} {{ page_title }}{%- if current_tags -%}{% assign meta_tags = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} – {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} – {{ shop.name }}{% endunless %}

{%- render ‘fb-open-graph’ -%}
{%- render ‘style-resources’, type: ‘preload’ -%}
{%- render ‘theme-font’ -%}
{%- render ‘style-resources’, type: ‘’ -%}
{%- render ‘js-resources’ -%}

{{ content_for_header }}

{%- capture headerGroup -%} {%- case settings.header_style -%} {%- when '1' -%} {%- sections 'group-header' -%} {%- when '2' -%} {%- sections 'group-header-2' -%} {%- when '3' -%} {%- sections 'group-header-3' -%} {%- when '4' -%} {%- sections 'group-header-4' -%} {%- else -%} {%- sections 'group-header-5' -%} {%- endcase -%} {%- endcapture -%}

{%- render ‘header-group’, group: headerGroup -%}

{%- render 'breadcrumb', pageLayout: settings.page_layout -%}

{%- capture mainContent -%}{{ content_for_layout }}{%- endcapture -%}
{%- render ‘layout’, content_for_layout: mainContent -%}

{%- sections 'group-footer' -%}
{%- render 'popup' -%} {%- if request.design_mode and shop.permanent_domain != 'arena-chromium-02.myshopify.com' -%}{%- render 'verify' -%}{%- endif -%}

{{ #‘json-remove-locale-schema.min.js’ | asset_url | script_tag }}

I have also tried uploading the theme file again from scratch and it does it straight away so I am thinking it is something from the theme rather than what I have edited.

I have also gone through all the Liquid files

And only 2 pages have {%- if request.design_mode -%}

If you would like a copy of the code from them I can post up

Quickly looked over and do not see anything wrong, except:

  1. Each render or section(s) has lots of liquid code in snippet or section file(s). So it would be necessary to inspect them as well.

  2. The line above the tag, {{ #‘json-remove-locale-schema.min.js’ | asset_url | script_tag }} – the # should not be there, but probably is not the source of your problem.

  3. This looks like a paid theme not from the Shopify store, these themes often add some kind of license verification (and there is a render ‘verify’ in the code above) – this can potentially be a cause.

I’d continue by commenting out portions of the code with {% comment %} .. {% endcomment %}, say each of the render or section(s) line and see if the problem goes away – then offending code should be inside commented out snippet or section.

And do not forget to make a theme copy as a backup first.

Are those used on homepage?

Also, does it happen on homepage only, or all pages?

If you’re unable to select other pages from the drop-down, you should be able to load different page in Customizer by editing your URL in command line, say to be like https://admin.shopify.com/store/…/themes/…/editor?previewPath=%2Fcollections*%2F*all which should open /collections/all in Customizer – so basically it’s a path to a page you want where “/” are replaced with “%2F”.

Probably, given that there are a couple of other cases reported the problem is on the Shopifys end. So worth waiting and contacting them…

1 Like

Thanks Tim

It seems to have come back on working tonight

Thanks for your help

2 Likes

Hi, I got exactly the same issue. Did you fix that?
The theme editor can’t load because of Liquid error: memory limits exceeded error. Can’t do anything..

I have the same issue and it has been going on for weeks now. This is my 3rd request to shopify and they say everything is good on their end hands clean. This is frustrating.