We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Theme Editor Failed to Load Page

Solved

Theme Editor Failed to Load Page

jamierush031
Tourist
4 0 4

Hi Guys,

 

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

 

Screenshot 2024-10-30 094258.png

 

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

Accepted Solution (1)
tim
Shopify Partner
4812 598 1733

This is an accepted solution.

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

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 9 (9)

tim
Shopify Partner
4812 598 1733

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....

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
jamierush031
Tourist
4 0 4

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: ' ' -%}
 
<!doctype html>
<html lang="{{ shop.locale }}" class="no-js">
<head>
  {%- if settings.favicon == blank -%}
    <link rel="shortcut icon" type="image/x-icon" href="{{ 'favicon.png' | asset_url }}">
  {%- else -%}  
    <link rel="shortcut icon" type="image/x-icon" href="{{ settings.favicon | image_url: width: 32, height: 32 }}">
  {%- endif -%}
 
  <link rel="canonical" href="{{canonical_url}}">
  <meta charset="utf-8">
  <meta name="viewport" content="viewport-fit=cover,width=device-width,initial-scale=1,user-scalable=0"/>
  <meta name="google" content="notranslate">
  <meta name='HandheldFriendly' content='True'>
  <meta name='MobileOptimized' content='360'>
  <meta http-equiv="cleartype" content="on">
  <meta name="theme-color" content="{{ settings.main_color }}">
 
  <title>{{ page_title }}{%- if current_tags -%}{% assign meta_tags = current_tags | join: ', ' %} &ndash; {{ 'general.meta.tags' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} &ndash; {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless %}</title>
 
  <meta name="description" content="{{ page_description | escape }}{% if current_tags %} {{ 'general.meta.tagged_html' | t: tags: meta_tags | escape }}.{% endif %}{% if current_page != 1 %} {{ 'general.meta.page' | t: page_number: current_page }}.{% endif %}" />
 
  <link rel="preconnect dns-prefetch" href="https://cdn.shopify.com">
  <link rel="preconnect dns-prefetch" href="{{ shop.url }}">
  <link rel="preconnect dns-prefetch" href="https://fonts.googleapis.com" crossorigin>
 
  {%- render 'fb-open-graph' -%}
  {%- render 'style-resources', type: 'preload' -%}
  {%- render 'theme-font' -%}
  {%- render 'style-resources', type: '' -%}
  {%- render 'js-resources' -%}
 
  {{ content_for_header }}
</head>
 
<body class="{{ body_class }}" data-template="{{template.name}}" data-suffix="{{template.suffix}}">
  {%- 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 -%}
 
  <main id="main-content">
    {%- render 'breadcrumb', pageLayout: settings.page_layout -%}
 
    {%- capture mainContent -%}{{ content_for_layout }}{%- endcapture -%}
    {%- render 'layout', content_for_layout: mainContent -%}
  </main>
 
  <footer class="footer" data-section-id="{{ 'footer' | md5 }}" data-section-type="footer">
    {%- sections 'group-footer' -%}
  </footer>
 
  <div class="popup-container">
    {%- render 'popup' -%}
    {%- if request.design_mode and shop.permanent_domain != 'arena-chromium-02.myshopify.com' -%}{%- render 'verify' -%}{%- endif -%}
  </div>
  
  {{ #'json-remove-locale-schema.min.js' | asset_url | script_tag }}
</body>
</html>
 
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.
jamierush031
Tourist
4 0 4

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

tim
Shopify Partner
4812 598 1733

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%2Fall which should open /collections/all in Customizer -- so basically it's a path to a page you want where "/" are replaced with "%2F".

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tim
Shopify Partner
4812 598 1733

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 </body> 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.

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tim
Shopify Partner
4812 598 1733

This is an accepted solution.

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

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
jamierush031
Tourist
4 0 4

Thanks Tim

 

It seems to have come back on working tonight

 

Thanks for your help

tarek_guma
Excursionist
22 0 4

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.. 

rekcosmetics
Visitor
2 0 0

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.