Liquid, JavaScript, themes, sales channels
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
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.
Hi what I need to do?
Please let me know how to proceed
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 don't think so but maybe I push something ........
and yes is full line
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.
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: '&','%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
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.
No as appear the same ..... nothing
How I can do to solve this as soon as possible?
Please
if you don't have the section in your code anymore:
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
Thank you
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024