/jsonapi/…?filter[moderation_state] — filtering on computed fields should return a helpful error rather than a 500

Created on 29 January 2019, over 5 years ago
Updated 16 August 2023, 10 months ago

Hi Team,

We are using your Entity Share Module. When can expect a stable version of your Entity Share module?

We are installed Content Moderation and workflow default modules in our application. Now we want to pull the content only some particular status (Draft/Archived/Published). We added a filter in the channel using the machine name of Content Moderation (moderation_state) in the value field given "Draft" value. But unable pull the content of "Draft" in another website we are getting below error.

GuzzleHttp\Exception\ClientException: Client error: `GET /jsonapi/node/demo_content_type?filter%5Blangcode-filter%5D%5Bcondition%5D%5Bpath%5D=langcode&filter%5Blangcode-filter%5D%5Bcondition%5D%5Boperator%5D=%3D&filter%5Blangcode-filter%5D%5Bcondition%5D%5Bvalue%5D=en&filter%5Bdraftgroup%5D%5Bgroup%5D%5Bconjunction%5D=OR&filter%5Bfield_email%5D%5Bcondition%5D%5Bpath%5D=field_email&filter%5Bfield_email%5D%5Bcondition%5D%5Boperator%5D=%3D&filter%5Bfield_email%5D%5Bcondition%5D%5Bvalue%5D=arunbabu.lavu%40gmail.com&filter%5Bfield_email%5D%5Bcondition%5D%5BmemberOf%5D=draftgroup&filter%5Bcontent_moderation_state%5D%5Bcondition%5D%5Bpath%5D=content_moderation_state&filter%5Bcontent_moderation_state%5D%5Bcondition%5D%5Boperator%5D=%3D&filter%5Bcontent_moderation_state%5D%5Bcondition%5D%5Bvalue%5D=draft&filter%5Bcontent_moderation_state%5D%5Bcondition%5D%5BmemberOf%5D=draftgroup&sort%5Bcreated%5D%5Bpath%5D=created&sort%5Bcreated%5D%5Bdirection%5D=ASC&page%5Boffset%5D=0` resulted in a `400 Bad Request` response: {"errors":[{"title":"Bad Request","status":400,"detail":"Invalid nested filtering. The field `content_moderation_state`, (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 of /mnt/www/html/project/docroot/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).

How can I meet my requirement? Please help with these issues.

📌 Task
Status

Active

Version

11.0 🔥

Component
JSON API 

Last updated 1 day ago

Created by

🇮🇳India arunbabu.lavu

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.

  • 🇦🇹Austria maxilein

    Reading this issue I conclude that it will not be possible to filter on moderation_states... correct?
    Is there some other way to figure out which nodes are workflow drafts?

    Thanks for your help.

Production build 0.69.0 2024