In 2 dev envirronments, i get this error after updating both drupal 8.x to drupal 9.2.1 and group 1.3 to 1.4.
I noted that groups are now revisionnable, updb looks to be passed.
Error : Call to a member function hasPendingRevision() on null dans Drupal\group\Entity\Access\GroupLatestRevisionCheck->access() (/var/www/intranet/web/modules/contrib/group/src/Entity/Access/GroupLatestRevisionCheck.php ligne 76)
#0 [internal function]: Drupal\group\Entity\Access\GroupLatestRevisionCheck->access(Object(Symfony\Component\Routing\Route), Object(Drupal\Core\Routing\RouteMatch), Object(Drupal\Core\Session\AccountProxy))
#1 /var/www/intranet/web/core/lib/Drupal/Core/Access/AccessManager.php(159): call_user_func_array(Array, Array)
#2 /var/www/intranet/web/core/lib/Drupal/Core/Access/AccessManager.php(135): Drupal\Core\Access\AccessManager->performCheck('access_check.gr...', Object(Drupal\Component\Utility\ArgumentsResolver))
#3 /var/www/intranet/web/core/lib/Drupal/Core/Access/AccessManager.php(92): Drupal\Core\Access\AccessManager->check(Object(Drupal\Core\Routing\RouteMatch), Object(Drupal\Core\Session\AccountProxy), NULL, true)
#4 /var/www/intranet/web/core/lib/Drupal/Core/Menu/LocalTaskManager.php(327): Drupal\Core\Access\AccessManager->checkNamedRoute('entity.group.la...', Array, Object(Drupal\Core\Session\AccountProxy), true)
#5 /var/www/intranet/web/core/lib/Drupal/Core/Menu/LocalTaskManager.php(358): Drupal\Core\Menu\LocalTaskManager->getTasksBuild('entity.group.de...', Object(Drupal\Core\Cache\CacheableMetadata))
#6 /var/www/intranet/web/core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php(95): Drupal\Core\Menu\LocalTaskManager->getLocalTasks('entity.group.de...', 0)
#7 /var/www/intranet/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build()
#8 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
#9 /var/www/intranet/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#10 /var/www/intranet/web/core/lib/Drupal/Core/Render/Renderer.php(786): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#11 /var/www/intranet/web/core/lib/Drupal/Core/Render/Renderer.php(377): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#12 /var/www/intranet/web/core/lib/Drupal/Core/Render/Renderer.php(449): Drupal\Core\Render\Renderer->doRender(Array)
Data model changes
Comments
Comment #2
oulalahakabu commentedComment #3
oulalahakabu commentedOk, looks like content_moderation module has to be enabled to make group work from now, we should set it as a requirement and enable it from 1.4 if it is not.
Comment #4
oulalahakabu commentedComment #5
kristiaanvandeneyndeOof, uhm no that is not supposed to happen :) Content moderation is an option, not mandatory. If it turns out that way, we need to fix that.
But from what I can tell, the route only gets modified if it exists:
And that route does not exist without Content Moderation enabled. So GroupLatestRevisionCheck should never get called unless you have Content Moderation enabled. See: EntityModerationRouteProvider/EntityTypeInfo.
Do you have any steps to reproduce?
Comment #6
oulalahakabu commentedI cannot test for now, this is an old install i migrate to latest releases, i did not have content_moderation but workbench_moderation ( https://www.drupal.org/project/workbench_moderation ), that should be my problem, i'll have a better look next week and provide a patch complying both workbench_moderation / content_moderation if you need.
Sorry, i did not watch a lot, just speed debugging.
Comment #7
kristiaanvandeneyndeOkay I'm going to close this one then. When you find how to reproduce this bug on a clean install with specific steps to reproduce, feel free to open a new issue so we can start fresh :)