Theme Editor Failed to Load Page

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

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…

Thanks Tim

It seems to have come back on working tonight

Thanks for your help

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.