Skip to content

structured_data filter throws Liquid error when first media isn't an imageΒ #3600

@chrisberthe

Description

@chrisberthe

The structured_data filter throws a Liquid error: invalid url input error when a product has the following conditions:

  1. A single variant
  2. The first media isn't an image, i.e. a video or 3D model

Usage:

<script type="application/ld+json">
  {{ product | structured_data }}
</script>

There may be other product setup conditions that affect this. This happens in Dawn as well.

cc @ludoboludo @tyleralsbury (πŸ‘‹πŸ»)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions