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

Hi Community,

I am currently working on the Shopify Theme Phantom, and I am working on a copy of my theme without interruption. However, now every theme has this error: “Liquid error (layout/theme line 7): Input must be a theme or shop asset URL. Liquid error (layout/theme line 8): Input must be a theme or shop asset URL. Liquid error (layout/theme line 17): Input must be a theme or shop asset URL,” when I preview each theme individually.

I am not sure where the error is coming from or how to fix it. My theme was working well initially, but after a few hours of working on it, the error appeared. Any help would be greatly appreciated.

I’ve attached files of code.

Thank you.

Hey @abid992

Looks like there are some syntax issues and misplaced characters in your code.

Try the below code.

{% capture content %}

  
    
    {%- liquid
      unless request.design_mode
        echo 'css-variables.css' | asset_url | preload_tag: as: 'style' 
        echo 'base.css' | asset_url | preload_tag: as: 'style'
        if template contains 'product'
          echo 'main-product.css' | asset_url | preload_tag: as: 'style'
        endif
        if settings.popup_newsletter
          echo 'popup-newsletter.css' | asset_url | preload_tag: as: 'style'
        endif
        if settings.popup_rgpd_cookies__enable
          echo 'rgpd.css' | asset_url | preload_tag: as: 'style'
        endif
        if settings.popup_spin
          echo 'popup-spin.css' | asset_url | preload_tag: as: 'style'
        endif
      endunless
    -%}