Setting 'text' is invalid. All top level nodes must be '<p>', '<ul>', '<ol>' or '<h1>'-'<h6>' tags

Topic summary

A Shopify developer is encountering an error stating that all top-level nodes in text settings must use specific HTML tags (<p>, <ul>, <ol>, or heading tags). The error appears in their templates/index.json file for two text-type settings in the hero section and about-us section.

Key Details:

  • The developer has already wrapped the text content in <p> tags but continues to receive the error
  • The JSON file shows text blocks configured with "type": "text" within an image-banner section and other components
  • The file appears to contain some corrupted or reversed text data (possibly encoding issues)

Proposed Solution:
Another user suggests replacing "type": "text" with "type": "rich-text" in the sections configuration.

Status: The discussion remains open with one potential solution offered but not yet confirmed as working.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

I’ve seen other discussions answer this question but it doesn’t seem to be working. I’m new to shopify development but I’ve done some web development but I seem to have little idea of what I’m doing integrating my mockup into shopify and the docs don’t seem to help here. My index.json is giving me the error “Setting ‘text’ is invalid. All top level nodes must be ‘

’, ‘

    ’, ‘
      ’ or ‘

      ’-‘

      ’ tags” there are only 2 instances of type “text” in the file. body_text under the hero_section the about-us sections. I’ve wrapped the text of both settings in

      tags and still get this error. Below is my templates/index.json file.

      {
        "sections": {
          "hero_section": {
            "type": "image-banner",
            "blocks": {
              "heading_text": {
                "type": "heading",
                "settings": {
                  "heading": "Relaxation, Redefined",
                  "heading_size": "h1"
                }
              },
              "body_text": {
                "type": "text",
                "settings": {
                  "text": "<p>Discover the ultimate in relaxation with Serenisphere's carefully curated products.</p>",
                  "text_style": "body"
                }
              },
              "button_1": {
                "type": "buttons",
                "settings": {
                  "button_label": "Explore Products",
                  "button_link": "shopify://collections/all",
                  "button_style_secondary": false
                }
              }
            },
            "block_order": [
              "heading_text",
              "body_text",
              "button_1"
            ],
            "settings": {
              "image": "shopify://shop_images/hero-background.webp",
              "image_overlay_opacity": 50,
              "image_height": "large",
              "desktop_content_alignment": "center",
              "desktop_content_position": "center",
              "mobile_content_alignment": "center",
              "show_text_box": true,
              "show_text_below": false,
              "text_color": "#ffffff",
              "background_color": "linear-gradient(to top right, rgba(30, 39, 69, 0.5), rgba(30, 39, 69, 0.5))"
            }
          },
          "featured_products": {
            "type": "featured-collection",
            "settings": {
              "title": "Our Featured Products",
              "heading_size": "h2",
              "collection": "all",
              "products_to_show": 3,
              "columns_desktop": 3,
              "show_view_all": true,
              "swipe_on_mobile": true,
              "image_ratio": "adapt",
              "show_secondary_image": true,
              "show_rating": true,
              "columns_mobile": 2,
              "text_color": "#ffffff",
              "background_color": "linear-gradient(to top right, rgba(30, 39, 69, 0.75), rgba(30, 39, 69, 0.75))",
              "padding_top": 36,
              "padding_bottom": 36
            }
          },
          "about_us": {
            "type": "rich-text",
            "blocks": {
              "heading_text": {
                "type": "heading",
                "settings": {
                  "heading": "About Serenisphere",
                  "heading_size": "h2"
                }
              },
              "body_text": {
                "type": "text",
                "settings": {
                  "text": "<p>At Serenisphere, we believe in creating a sanctuary for relaxation and rejuvenation. Discover how our products bring peace and comfort to your life.</p>",
                  "text_style": "body"
                }
              }
            },
            "block_order": [
              "heading_text",
              "body_text"
            ],
            "settings": {
              "text_color": "#ffffff",
              "background_color": "linear-gradient(to bottom, #001f3f, #00264d)",
              "padding_top": 36,
              "padding_bottom": 36,
              "cta_button_label": "Learn More",
              "cta_link": "#about"
            }
          },
          "video_section": {
            "type": "video",
            "settings": {
              "heading": "Experience Relaxation",
              "video_url": "https://www.youtube.com/watch?v=_9VUPq3SxOc",
              "heading_size": "h2",
              "description": "Discover the soothing effects of Serenisphere products in action.",
              "full_width": true,
              "text_color": "#ffffff",
              "background_color": "#1e2745",
              "padding_top": 36,
              "padding_bottom": 36
            }
          },
          "featured_collection": {
            "type": "featured-collection",
            "settings": {
              "title": "Complete Your Serenity",
              "heading_size": "h2",
              "collection": "all",
              "products_to_show": 6,
              "columns_desktop": 3,
              "show_view_all": true,
              "swipe_on_mobile": false,
              "image_ratio": "square",
              "show_secondary_image": false,
              "show_rating": true,
              "columns_mobile": 2,
              "text_color": "#ffffff",
              "background_color": "#3e9c9c",
              "padding_top": 28,
              "padding_bottom": 36
            }
          },
          "contact_us": {
            "type": "multicolumn",
            "blocks": {
              "column1": {
                "type": "column",
                "settings": {
                  "title": "Call Us",
                  "text": "1-800-RELAX"
                }
              },
              "column2": {
                "type": "column",
                "settings": {
                  "title": "Email Us",
                  "text": "support@serenisphere.com"
                }
              },
              "column3": {
                "type": "column",
                "settings": {
                  "title": "Visit Us",
                  "text": "123 Serenity Lane, Relaxation City"
                }
              }
            },
            "block_order": [
              "column1",
              "column2",
              "column3"
            ],
            "settings": {
              "title": "Contact Us",
              "heading_size": "h2",
              "image_width": "third",
              "image_ratio": "adapt",
              "columns_desktop": 3,
              "column_alignment": "center",
              "background_color": "#3d6a81c6",
              "text_color": "#ffffff",
              "padding_top": 36,
              "padding_bottom": 36
            }
          }
        },
        "order": [
          "hero_section",
          "featured_products",
          "about_us",
          "video_section",
          "featured_collection",
          "contact_us"
        ]
      }
      

Hi,

Try replacing the type: ‘rich-text’ in the sections with type: ‘text’.