HTML Error notification - Please help!

Hi!

I was entering some info in my pages and wanted to change some things in the theme editor where I receive a notification in the theme editor that there is damaged HTML code detected in the sections/page.liquid can someone tell me what the error is and where and how to fix it? I am not very familiar with coding so i greatly appreciate any help you can give me. Please see below the code i copied and pasted..

Many thanks!!//Lise

{{ ‘section-main-page.css’ | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{%- if section.settings.page.title != blank -%} {{ section.settings.page.title | escape }} {%- else -%} {{ 'sections.page.title' | t }} {%- endif -%}

{%- if section.settings.page.content != blank -%} {{ section.settings.page.content }} {%- else -%}
{{ 'page' | placeholder_svg_tag: 'page-placeholder' }}
{%- endif -%}

{% schema %}
{
“name”: “t:sections.page.name”,
“tag”: “section”,
“class”: “section”,
“disabled_on”: {
“groups”: [“header”, “footer”]
},
“settings”: [
{
“type”: “page”,
“id”: “page”,
“label”: “t:sections.page.settings.page.label”
},
{
“type”: “select”,
“id”: “heading_size”,
“options”: [
{
“value”: “h2”,
“label”: “t:sections.all.heading_size.options__1.label”
},
{
“value”: “h1”,
“label”: “t:sections.all.heading_size.options__2.label”
},
{
“value”: “h0”,
“label”: “t:sections.all.heading_size.options__3.label”
},
{
“value”: “hxl”,
“label”: “t:sections.all.heading_size.options__4.label”
},
{
“value”: “hxxl”,
“label”: “t:sections.all.heading_size.options__5.label”
}
],
“default”: “h1”,
“label”: “t:sections.all.heading_size.label”
},
{
“type”: “color_scheme”,
“id”: “color_scheme”,
“label”: “t:sections.all.colors.label”,
“default”: “scheme-1”
},
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
],
“presets”: [
{
“name”: “t:sections.page.presets.name”
}
]
}
{% endschema %}

@BonFeet

If possible can you please share a screenshot of the error?

I use your same code in my dawn theme and there is not error occurred in my demo store. https://prnt.sc/LX8BNM2GGrYx

https://prnt.sc/OWHX0eJXqwJU

If possible please share the screenshot of the error so I can identity it.

Hi @BonFeet

Would you mind sharing with us the screenshot of the error to check further?

For the code, you can try this code to see if the issue is resolved. I have made some some improvements for clarity and potential fixing of syntax issues:

{{ 'section-main-page.css' | asset_url | stylesheet_tag }}  

{%- style -%}  
.section-{{ section.id }}-padding {  
    padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;  
    padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;  
}  

@media screen and (min-width: 750px) {  
    .section-{{ section.id }}-padding {  
        padding-top: {{ section.settings.padding_top }}px;  
        padding-bottom: {{ section.settings.padding_bottom }}px;  
    }  
}  
{%- endstyle -%}  

  
    
  
        ##   
            {%- if section.settings.page.title != blank -%}  
                {{ section.settings.page.title | escape }}  
            {%- else -%}  
                {{ 'sections.page.title' | t }}  
            {%- endif -%}  
          
          
            {%- if section.settings.page.content != blank -%}  
                {{ section.settings.page.content }}  
            {%- else -%}  
                
  
                    {{ 'page' | placeholder_svg_tag: 'page-placeholder' }}  
                
  
            {%- endif -%}  
        
  
    
  

  

{% schema %}  
{  
    "name": "t:sections.page.name",  
    "tag": "section",  
    "class": "section",  
    "disabled_on": {  
        "groups": ["header", "footer"]  
    },  
    "settings": [  
        {  
            "type": "page",  
            "id": "page",  
            "label": "t:sections.page.settings.page.label"  
        },  
        {  
            "type": "select",  
            "id": "heading_size",  
            "options": [  
                {  
                    "value": "h2",  
                    "label": "t:sections.all.heading_size.options__1.label"  
                },  
                {  
                    "value": "h1",  
                    "label": "t:sections.all.heading_size.options__2.label"  
                },  
                {  
                    "value": "h0",  
                    "label": "t:sections.all.heading_size.options__3.label"  
                },  
                {  
                    "value": "hxl",  
                    "label": "t:sections.all.heading_size.options__4.label"  
                },  
                {  
                    "value": "hxxl",  
                    "label": "t:sections.all.heading_size.options__5.label"  
                }  
            ],  
            "default": "h1",  
            "label": "t:sections.all.heading_size.label"  
        },  
        {  
            "type": "color_scheme",  
            "id": "color_scheme",  
            "label": "t:sections.all.colors.label",  
            "default": "scheme-1"  
        },  
        {  
            "type": "header",  
            "content": "t:sections.all.padding.section_padding_heading"  
        },  
        {  
            "type": "range",  
            "id": "padding_top",  
            "min": 0,  
            "max": 100,  
            "step": 4,  
            "unit": "px",  
            "label": "t:sections.all.padding.padding_top",  
            "default": 36  
        },  
        {  
            "type": "range",  
            "id": "padding_bottom",  
            "min": 0,  
            "max": 100,  
            "step": 4,  
            "unit": "px",  
            "label": "t:sections.all.padding.padding_bottom",  
            "default": 36  
        }  
    ],  
    "presets": [  
        {  
            "name": "t:sections.page.presets.name"  
        }  
    ]  
}  
{% endschema %}

I hope it helps.

Best regards,

Liz

{%- if section.settings.page.title != blank -%} {{ section.settings.page.title | escape }} {%- else -%} {{ 'sections.page.title' | t }} {%- endif -%}

{%- if section.settings.page.content != blank -%} {{ section.settings.page.content }} {%- else -%}
{{ 'page' | placeholder_svg_tag: 'page-placeholder' }}
{%- endif -%}

Please review the code, and use format liquid option at top right corner on code editor. Make sure all the HTML tag are closed properly.

Hi @BonFeet

Please share error image

Hi Liz,

Thanks for your code, i have replaced the code in the theme for your code, but i still get the same error. I have sent you a screenshot of the error displayed earlier. Hope you can help!

Many thanks!

Hi Liz,

I copied the code from an earlier copy of the theme that did not display the error. Can you see if there is any difference? Maybe I can copy this code into the theme that is published now?

Thanks!

{{ ‘section-main-page.css’ | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{%- if section.settings.page.title != blank -%} {{ section.settings.page.title | escape }} {%- else -%} {{ 'sections.page.title' | t }} {%- endif -%}

{%- if section.settings.page.content != blank -%} {{ section.settings.page.content }} {%- else -%}
{{ 'page' | placeholder_svg_tag: 'page-placeholder' }}
{%- endif -%}

{% schema %}
{
“name”: “t:sections.page.name”,
“tag”: “section”,
“class”: “section”,
“disabled_on”: {
“groups”: [“header”, “footer”]
},
“settings”: [
{
“type”: “page”,
“id”: “page”,
“label”: “t:sections.page.settings.page.label”
},
{
“type”: “select”,
“id”: “heading_size”,
“options”: [
{
“value”: “h2”,
“label”: “t:sections.all.heading_size.options__1.label”
},
{
“value”: “h1”,
“label”: “t:sections.all.heading_size.options__2.label”
},
{
“value”: “h0”,
“label”: “t:sections.all.heading_size.options__3.label”
},
{
“value”: “hxl”,
“label”: “t:sections.all.heading_size.options__4.label”
},
{
“value”: “hxxl”,
“label”: “t:sections.all.heading_size.options__5.label”
}
],
“default”: “h1”,
“label”: “t:sections.all.heading_size.label”
},
{
“type”: “color_scheme”,
“id”: “color_scheme”,
“label”: “t:sections.all.colors.label”,
“default”: “scheme-1”
},
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
],
“presets”: [
{
“name”: “t:sections.page.presets.name”
}
]
}
{% endschema %}

Hi @BonFeet

Have you updated your theme recently?

Sometimes theme updates will cause errors

Or right before the error occurred, do you remember what you edited?

It was fixed with the help of shopify. it was an issue with description of the collection and a page that was linked to the theme that were conflicting.