How to fix Liquid error (sections/product-template-2 line 103): invalid integer

Topic summary

Liquid error “invalid integer” on a Shopify product page, reported at sections/product-template-2 line 103. The line renders product.description using multiple Liquid filters and splits.

Key details:

  • Code at fault: {{ product.description | strip_html | truncatewords: truncatewords_count | split: ‘[short_description]’ | first | split: ‘[pr oduct_description]’ | first | split: ‘[new_products]’ | first | split: ‘[product_video]’ | first | split: ‘[affiliate_link]’ | first | split: ‘[countdown]’ | first | split: ‘[unique_description_1]’ | first | split: ‘[unique_description_2]’ | first | split: ‘[unique_description_3]’ | first }}
  • Liquid is Shopify’s templating language; filters like strip_html and truncatewords transform text. The error message suggests something expected to be an integer is invalid on that line.
  • A screenshot shows the error on the product page; the code snippet is central to understanding the issue.

User requests:

  • Asks if it’s an easy fix and what steps to take; provides an email for contact.

Status:

  • No solution or guidance provided in-thread yet; issue remains unresolved and awaiting assistance.
Summarized with AI on December 14. AI used: gpt-5.

I came across this error while on the product page of my website.

I’ve looked in the code section but don’t understand the code. This is the code on line 103:

{{ product.description | strip_html | truncatewords: truncatewords_count | split: '[short_description]' | first | split: '[product_description]' | first | split: '[new_products]' | first | split: '[product_video]' | first | split: '[affiliate_link]' | first | split: '[countdown]' | first | split: '[unique_description_1]' | first | split: '[unique_description_2]' | first | split: '[unique_description_3]' | first }}

Would somebody be able to help me understand and fix it please

Hi, is it something easy i’m missing?

Ok, what can I do?

[email removed]