Liquid error: Error in tag 'section' - 'static-product' is not a valid section type

NievesNetgear
New Member
13 0 0

Good afternoon, can you please help with this error as soon as possible: 

Liquid error: Error in tag 'section' - 'static product is not a valid section type

Thank you

 
Replies 12 (12)

Jason
Shopify Expert
11190 225 2282

It sounds like the section you're trying to access in the product.liquid template doesn't exist. We can talk through it here without having to share account details - if you're willing to share a little bit of code from the pages. We're a helpful bunch so will walk you through it.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
NievesNetgear
New Member
13 0 0

Hi what I need to do?

NievesNetgear
New Member
13 0 0

Please let me know how to proceed 

Jason
Shopify Expert
11190 225 2282

First up, let's talk about the product.liquid template. Have you made changes to it?

Whilst you're thinking about that, look at the contents of that template file (product.liquid) and find the part with the {% section %} code. What is the full line?

(oh, and i also removed the "solved" that was added to my previous post. it's not a solve so doesn't deserve it).

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
NievesNetgear
New Member
13 0 0

I don't think so but maybe I push something ........ 

and yes is full line

Jason
Shopify Expert
11190 225 2282

Can you paste that line of code here please? That's important to see.
It will then lead to a second request, and that will be looking to see if the Section if refers to exists or not.

You will be able to see if you made changes to the template file by looking at if there's previous versions.
https://shopify.dev/tutorials/customize-theme-troubleshooting-roll-back-to-older-version-of-theme

^ in case you are tempted to rollback immediately do be aware that you'll lose any customisations you made.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
NievesNetgear
New Member
13 0 0

This is the code:

{% section 'static-product' %}<div class="yotpo yotpo-main-widget" data-product-id="{{ product.id }}" data-name="{{ product.title | escape }}" data-url="{{ shop.url }}{{ product.url }}" data-image-url="{{ product.featured_image | product_img_url: 'large' |replace: '?', '%3F' | replace: '&amp;','%26'}}" data-description="{{ product.description | escape }}" data-price="{{ variant.price | money_without_currency }}" data-currency="{{ shop.currency }}"></div>

 

and I check the old version and are the same

Jason
Shopify Expert
11190 225 2282

Thanks, that's useful to see that your code looks correct.
I'll make the assumption you've accidently deleted the static-product section. Do you have an older version of your theme you could copy it back from?

If you don't have an older copy then you'll want to install a new copy of your theme (as an unpublished theme). It might be a newer version of the theme but it's worth trying! You also have the option of contacting the theme developer as well.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
NievesNetgear
New Member
13 0 0

No as appear the same ..... nothing 

NievesNetgear
New Member
13 0 0

How I can do to solve this as soon as possible?

Please

Jason
Shopify Expert
11190 225 2282

if you don't have the section in your code anymore:

  • install the theme again (unpublished) so you can recreate the section, or
  • contact the theme devs for support

We don't know the theme as you've not given a link or added context on the theme. If it's a free one that's something the members could help with. If it's a paid theme the two options above are your first next steps

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
NievesNetgear
New Member
13 0 0

Thank you