Jsonapi filters not returning results if same field from reference fields are passed as filters

Created on 29 June 2021, over 3 years ago
Updated 12 July 2024, 5 months ago

Problem/Motivation

Hi,
I am facing an issue that i have a node of type news which has 2 taxonomy reference fields.One refers to vocab news_type and other to news_position. The two vocabs have same field in them 'field_tag' but when i am trying to filter out the content using jsonapi it is not working.

Steps to reproduce

1. Create a content type of type news which has 2 taxonomy reference fields.
2. One field references to one vocab "news_type" and the other refers to a different vocab "news_position".
3. Let's say both vocabs have same field "field_tag" in them.
4. Now try to filter out the content using jsonapi.
JSONAPI url:-
jsonapi/news?filter[news_type.field_tag]=Test1&filter[news_position.field_tag]=1234

The API doesn't return any node but if we pass each filter individually then it works fine.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
JSON API 

Last updated 6 days ago

Created by

🇮🇳India Chirag_Garg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024