Updated the branch with current 2.x so that patch from plain diff should apply to 2.2.2.
Testet it with Drupal 10.5.4 and scheduler 2.2.2.
Publishing drafts of multiple translations works for me.
fetchAllKeyed() correctly returns an array for me and not a StatementWrapperIterator. @nicrodgers do you have hook_scheduler_list_alter registered in your project maybe?
MR-81 seems to work for me in a site with more than 15 languages and content_moderation.
Setup
drupal/core: 10.5.1
scheduler: 2.2.1
scheduler_content_moderation_integration: 3.0.4
Rebased MR on current main. The rebase reverts code changes done in
#3098550: Nested groups render on other entity forms (or when fields are inaccessible) when they shouldn't β
.
The added test still passes.
#3098550: Nested groups render on other entity forms (or when fields are inaccessible) when they shouldn't β introduced also a check for empty field groups
// If the element is a group, check if it is empty or not.
$empty_element = in_array($child_name, $groups) ? $empty_groups_indication[$child_name] : $empty_element;
I don't know if this Issue is still needed. 3098550 sorts the children and first checks the fields and then the groups if they are empty. This MR checks the fields and groups recursive using the group hierarchy.
I will update my projects to field_groups 4 soon and then check them without the patch from this MR.
I can also confirm that the patch fixes the issue for 3.6 and Drupal 10.3.0.
I refactored the code from @Rob320 a bit and reduced the loops.
The structure of the check is now also more similar to field_group_remove_empty_display_groups.
I tested it with nested paragraphs, each of which has nested field groups.