- last update
over 1 year ago 29,479 pass - Status changed to Needs review
over 1 year ago 4:49pm 18 September 2023 - last update
over 1 year ago Custom Commands Failed - πΊπΈUnited States jdleonard Austin, TX, USA
#17 applied to 10.1.3 and allowed my view with aggregation to work with a Moderation State field.
Setting to Needs Review as there are no steps to reproduce the error described in #18 and this is working for me.
- Status changed to Needs work
over 1 year ago 4:56pm 18 September 2023 - πΊπΈUnited States smustgrave
Issue summary update and tests will still be needed.
- last update
over 1 year ago 30,438 pass - π¨πΏCzech Republic David Urban
I have just tested with 10.2.2 and the #17 patch seems to be working.
- πΊπΈUnited States tyler.hastain Utah
Added patch 17 for Drupal 10.2.4. It only fixes the issue if the aggregation setting for the moderation state is set to aggregate on the Entity ID instead of the Value. (See attached screenshot for more information.)
- πΊπΈUnited States maskedjellybean Portland, OR
Thank you for this. #17 worked for me in Drupal 10.2.3.
#17 partially worked for me in Drupal 10.3.0 and 10.2.3
I use an aggregartion on content moderation states field with the count aggrator in combination with the chart module.I've solved my issue with tha hook_views_query_alter
function hook_views_query_alter(ViewExecutable $view, $query):void { //Fix bug for views on content moderation if(!empty($query->fields)){ foreach($query->fields as $kf=>$field){ if(isset($field['function'])){ if($field['field']=='moderation_state'){ $query->fields[$kf]['table']= 'content_moderation_state'; } } } } }
- πΊπ¦Ukraine myLies
#17 works for me with Drupal 10.2.6 (simple aggregation case by value column)
Thank you @anchal_gupta - πΊπ¦Ukraine myLies
UPD: The patch from #17 do not correctly evaluate the sort operation - simply, the ORDER BY wasn't been added
I have update a bit a patch from #17 to make sort works (see the interdiff)
This way it works for me with D10.2