Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295445

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

$
0
0

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


Viewing all articles
Browse latest Browse all 295445


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>