Error while updating drafts: [snippets/card-product.liquid] Liquid syntax error: Cannot use include

I noticed a error in the dev environment yesterday and asked virtual agent for help:

me: how to fix syntax error: Cannot use render tag in app snippets ?

  • bot: The render tag cannot be used in app snippets. Instead, use the include tag for app snippets to avoid syntax errors. Let me know if you need further clarification!

me: if i change to include, then i get:

Liquid syntax error: Cannot use include tag in app snippets

  • bot: The error “Liquid syntax error: Cannot use include tag in app snippets” occurs because the include tag is not supported in app snippets. Instead, you should use the render tag, which is the recommended method for including snippets in themes.

Would you like guidance on how to update your code or troubleshoot further?

:rofl: :rofl: :rofl: I have to ask here

Hi @valorloff

Can you render tag in the section files?

Pls share us all the code in this file

Hi @Sonya_2025
I have extensions/my-block/snippets/card-product.liquid, which is contain row:

{% render ‘price’, product: card_product, price_class: ‘’, show_compare_at_price: true %}
which is works in dev/ production last year, but in dev terminal appears:
Error while updating drafts: [snippets/card-product.liquid] Liquid syntax error: Cannot use render tag in app snippets
What is mean and what i need do ?

Hi @valorloff

Thanks for your reply

If the snippet is generated by an app, you cannot use {% include %} or {% render %} inside it. Instead, you need to modify the app snippet or the way it interacts with your theme.

Instead of having the app inject a snippet with {% include %}, create a custom snippet in your theme and call it directly from your theme files.

@Sonya_2025
Thanks for help!
how to call it directly from your theme files ?
and this is public app, you suggestion “create a custom snippet in your theme and call it directly from your theme files” breaks the principle of theme extension autonomy!
May be just have to manually paste the code into single snippet file?