In beta versions of Content Moderation a relationship was required to the content_moderation_state entity type in order to display and filter by moderation states. This relationship now appears in the views UI with a warning that it is deprecated and sites using it will generate a requirements error. The deprecation provides users the opportunity to remove the relationship and instead use the moderation_state field before it is removed in Drupal 9.
Instead of adding a views relationship, you can add the "Moderation state" field which will appear directly in the category corresponding to the moderated entity type:

If you have significant customisations that depend on the relationship to the content_moderation_state entity type, you may install the Content Moderation State Relationship contributed module, however you should be aware that the entity type is internal and thus makes weaker guarantees regarding backwards compatibility.
| Attachment | Size |
|---|---|
| Screen Shot 2019-06-12 at 3.42.43 pm.png | 61.22 KB |
Comments
Contextual filter for Moderation state in D9
Will there be a contextual filter available for Moderation state in D9?
Right now, in a Drupal
8.8.1, the only way to use Moderation state as a contextual filter is to add a relationship to the View.a tip
If you land here from google looking for how to show the latest moderation state in your admin/content view, this view shows how to achieve it
https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/modules/cont...
I have many views that are
I have many views that are broken after upgrading to D9 which do not even use the moderation_state anywhere. Getting this error:
Looking at the view, it does not make use of any moderation_state field, and the word "moderation" does not exist in the config yml of the view. It appears that moderation_state adds itself to every view (possibly to check access?) but since it can't find the 'base' key it breaks completely.
The content_moderation_state_relationship module does fix it but in my opinion shouldn't be needed - Drupal 9 should not have broken views that aren't even using content_moderation.