preload_tag filter doesn't output correctly on 404 page

maxrfinch
Excursionist
21 1 27

Noticed an issue where the preload_tag filter doesn't output anything but the URL (missing the rest of the tag)

https://shopify.dev/api/liquid/filters/html-filters#preload_tag

 

Expected Output: 

 

 

<link href="//cdn.shopify.com/s/files/1/0645/1401/t/164/assets/[SOURCE-FILE-HERE]?v=1493818336520096671" rel="preload" as="script">

 

 

 

Actual Output:

 

 

"//cdn.shopify.com/s/files/1/0645/1401/t/164/assets/[SOURCE-FILE-HERE]?v=1493818336520096671"

 

 

 

What I have in the backend:

 

 

{{ '[SOURCE-FILE-HERE]' | asset_url | preload_tag: as: 'script' }}

 

 

 

Note that it works fine on any other page. The 404 page is the only page with issues.

Reply 1 (1)
alexhales42803
New Member
2 0 0

Same problem but i have also been redirected to 404 on my site. This 404 error does,nt make sense.