Help. I deleted 2 lines of code and apparently not the good ones

Topic summary

Main issue: After removing two lines while optimizing for speed, the storefront displays Liquid errors above the header: missing snippets at layout/theme lines 142 and 146 for “zenithify.smartlabels.liquid” and “easy-gdpr-settings.liquid.” The poster also notes slow performance due to a large header image and shares a PageSpeed Insights mobile report link.

Context: “Liquid” is Shopify’s templating engine. “Snippets” are small reusable template files included in a theme.

Proposed fix: A responder states the errors occur because those snippet files don’t exist in the published theme. Recommended steps:

  • Online Store > Themes > Edit code.
  • In Snippets, Add a new snippet named “zenithify.smartlabels.liquid”.
  • Add another snippet named “easy-gdpr-settings.liquid”.
    They note adding empty files is sufficient and won’t affect the site. An illustrative screenshot is included.

Status and gaps: A concrete fix has been provided for the Liquid errors; no confirmation of resolution yet. The header image speed concern remains unaddressed with no specific optimization steps discussed. The discussion appears open.

Summarized with AI on December 25. AI used: gpt-5.

Hello,

I was trying to optimise for speed golden-pigs.com and I deleted two lines of code and now I have an error when opening the website.

the following code snippets appear above the website’s header:

  • Liquid error (layout/theme line 142): Could not find asset snippets/zenithify.smartlabels.liquid
  • Liquid error (layout/theme line 146): Could not find asset snippets/easy-gdpr-settings.liquid

Can someone help please?

Also, the header image is causing a big delay in speed. Can someone help with this also? :grinning_face_with_smiling_eyes:

https://pagespeed.web.dev/analysis/https-www-golden-pigs-com/9iiz0dqmre?form_factor=mobile

Thank you in advance!

Kind regards,

Cristi

Hi @Golden_Pigs ,

The error is because those two files do not exist in your published theme. To fix this issue, you just need to add two similar empty files to the published theme you are using; it won’t affect your website.

Please follow these steps:

Step 1: Navigate to Online Store > Themes > Edit code

Step 2: Move to Snippets folder > Add a new snippet and add 2 file zenithify.smartlabels.liquid and easy-gdpr-settings.liquid as below figure

Hope this can help you,

If our suggestions are useful, please let us known by giving a like or marking it as a solution. Thank you :heart_eyes: :heart_eyes: :heart_eyes:

1 Like