Skip to content

where doesn't work on terms #3636

@edalzell

Description

@edalzell

Bug Description

You can't use the where modifier on a list of terms, in an entry.

How to Reproduce

  1. Create a taxonomy, tags and have a foo text field on it
  2. Add 3 terms, 2 of which have bar in the foo field
  3. Add that taxonomy to a collection
  4. Create an entry and add those 2 terms to it
  5. In the entry template have:
{{ tags where="foo:bar" }}
    {{ title }}
{{ /tags}}

I'd expect to see those two terms, but nothing is shown.

Extra Detail

Entry:

---
title: 'Some tags'
tags:
  - blue
  - green

Term:

title: Blue
order: 2
updated_by: e8982d24-f8f9-4e2f-9286-062f9d98aa4a
updated_at: 1620098429
foo: bar

Blueprint:

title: Posts
template: post
layout: layout
mount: 65d2c20e-e54a-4b0a-866c-d8176e5dd2f3
taxonomies:
  - tags

Environment

Statamic 3.1.11 Pro
Laravel 8.40.0
PHP 8.0.5
No addons installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions