JSON:API creates unsolvable condition for profiles (the module) if filtered with uid.id condition.

Created on 24 July 2023, over 1 year ago

Hi, I opened a ticket on the profile issue tracker, because I was not sure which code leads to the problem https://www.drupal.org/project/profile/issues/3376470 🐛 JSON:API filtering or some permissions are not working as expected Needs review but I am more and more certain, that the JSON:API entity query system does something in building the query for the database which leads to unsolvable conditions.

To not replicate the entire issue. I have linked it here. In short. I wanted to request profiles of a certain type from the Drupal server which works fine without any filters. When using the uid.id filter to get only the profiles of a certain user it fails, because an unsolvable condition is added to the SQL.

The importance here is, that I do both requests with the same (non-admin) user! Without filter conditions all entities are returned. When using filters none is returned. This should be wrong, because why do filtering a result set returns nothing, when (by looking at the JSON result) there should be entities returned, because the UUID and the filter syntax is correct.

Please see the other issue and maybe move it were it belongs. (I digged it deep down to the poinzt were the alwaysFalsy() condition is added).

🐛 Bug report
Status

Active

Version

9.5

Component
JSON API 

Last updated 3 days ago

Created by

🇩🇪Germany ro-no-lo

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

Comments & Activities

Production build 0.71.5 2024