Problem
Steps to reproduce
- Enable
content_moderation
- Assign a workflow to a node bundle
- Create a new node view and add a "Moderation state" field
- Enable aggregation and execute the view
Result:
Drupal\Core\Entity\Sql\SqlContentEntityStorageException: Column information not available for the 'moderation_state' field. in Drupal\Core\Entity\Sql\DefaultTableMapping->getFieldColumnName() (line 430 of core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php).
Proposed resolution
As a workaround the deprecated moderation state relationship can still be used with a view that has aggregation enabled.