Shopify / theme-tools

Everything developer experience for Shopify themes
https://shopify.dev/docs/themes
MIT License
72 stars 19 forks source link

preload_tag not working with font_url filter #420

Open adictonator opened 9 months ago

adictonator commented 9 months ago

Describe the bug Using font_url in the preload_tag filter to preload font assets throws an error in theme editor.

Expected

The preload_tag filter should work with the font_url and not just asset_url.

Actual

Upon converting the <link> tag with the preload_tag filter, the Liquid error starts to show up in the theme editor.

Stack trace This is the error you see in the theme editor at the top.

Liquid error (layout/theme line 24): Input must be a theme or shop asset URL

Debugging information

Additional context

image

lukeh-shopify commented 3 months ago

👋🏻 Hi @adictonator! Thanks for reporting this. Unfortunately the Ruby version of theme check has been deprecated for some time. Would you be able to confirm you are still having issues when using our maintained version of theme check? This is done using either the latest version of the Shopify CLI, or via the Shopify Liquid Visual Studio Code extension.

If you are still having issues, please raise an issue over in the CLI or theme tools repositories. Thanks!

adictonator commented 3 months ago

Hi @lukeh-shopify, the issue still persists. It's not really about the linting but the error it throws in the Theme Editor area when using the preload_tag filter. The font loads just fine in the front end, but the editor shows the error.

I am using Shopify CLI 3.64.0. MacOS Sonoma 14.5 (23F79)

image image