- 🇫🇮Finland thatguy
Re-rolled patch from #40 to work with dev-3.0.x version
- 🇺🇸United States kroh San Antonio, TX
Re-rolled patch from #40 to work with 2.0.x
- 🇨🇦Canada gwvoigt London, ON 🇨🇦
Thanks, patch from #41 working on 3.x for me
- 🇺🇸United States scotwith1t Birmingham, AL
Patch needs a re-roll for new 3.0.0 release.
- 🇺🇸United States scotwith1t Birmingham, AL
Taking a stab...this is NOT my strong point, apologies if this is all messed up.
- last update
over 1 year ago 9,623 pass, 1 fail - 🇬🇧United Kingdom billywardrop
I patched groups 3.1 using the patch file in comment #46 but this stopped my theme running due to an error stating that group_content entity doesn't exist. Groups 3 now uses the group_relationship entity so I changed the entity type to group_relationship and the group nodes now show group blocks.
I have create a new patch and interdiff for this.
- last update
over 1 year ago 9,623 pass, 1 fail - 🇺🇦Ukraine ruslan piskarov Kyiv, Ukraine
Improved #48. Just removed "+ + " in diff.
- heddn Nicaragua
+++ b/src/Context/GroupRouteContextTrait.php @@ -81,4 +84,36 @@ trait GroupRouteContextTrait { + return $parameter instanceof NodeInterface;
Why are we focused on Nodes? Why not just entity interface instead? then it will work for anything that group itself supports.
Reroll #49 for 2.2.x — for people on the upgrade path. My first patch, sorry if I messed it up.
- last update
about 1 year ago 9,624 pass, 1 fail - 🇺🇸United States banoodle San Francisco, CA
Patch #51 applied OK for me, but throws these errors due to the inclusion of group_content.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group_content" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of /code/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).
This patch I'm uploading just replaces "group_content" with "group_relationship".
- First commit to issue fork.
- 🇺🇸United States karlshea Minneapolis 🇺🇸
Created MRs for both 3.x and 2.x from the latest patches.
- 🇺🇸United States dasginganinja Bethlehem, PA
@KarlShea, thanks for opening those MRs!
I used !159 and it worked ONLY AFTER I added the following line at the top of `src/Access/GroupPermissionAccessCheck.php`:
use Drupal\group\Context\GroupRouteContext;
After this patch was in place existing usages of the context_provider now started matching nodes associated with groups to their associated group.
Please note we only allow a group cardinality of one in our case.
Thank you and please add that to your MRs!
- 🇩🇪Germany geek-merlin Freiburg, Germany
Feedback: We used patch #52 in a project, but it broke access for links because the access check code is wrong (must not use current context as access can also be checked via $url->access().
Did not investigate further, will do it differently. - First commit to issue fork.
- 🇨🇦Canada slydevil Halifax
Added to the 2.2.2 MR, so the GroupRouteContext takes into account situations where the 'group' Route parameter is an ID rather than a fully loaded Group entity. This happens when you use permissions rather than group permissions (as far as I can tell).
Patch attached as well.
- Status changed to Needs review
about 1 month ago 10:23pm 1 November 2024 - 🇺🇸United States karlshea Minneapolis 🇺🇸
Rebased on 2.3.0/3.3.0, fixed phpcs/phpstan issues.
- 🇷🇺Russia ScorpionGhost
All patches stopped applying after updating the group to version 3.3.0
- 🇩🇪Germany markdc Hamburg
Apologies. I forgot that a MR is also usable as a patch.
!59 is working for me. Thank you!
- 🇩🇪Germany markdc Hamburg
Maybe I spoke too soon. The patch applied, but I get the following WSOD on Views that use the Group ID context. I also get this error in the console when trying to add the context to a new View:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group_relationship" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). Drupal\Core\Entity\EntityTypeManager->getHandler() (Line: 195) Drupal\Core\Entity\EntityTypeManager->getStorage() (Line: 113) Drupal\group\Context\GroupRouteContext->getBestCandidate() (Line: 52) Drupal\group\Context\GroupRouteContext->getRuntimeContexts() (Line: 71) Drupal\Core\Plugin\Context\LazyContextRepository->getRuntimeContexts() (Line: 91) Drupal\block\BlockAccessControlHandler->checkAccess() (Line: 109) Drupal\Core\Entity\EntityAccessControlHandler->access() (Line: 329) Drupal\Core\Entity\EntityBase->access() (Line: 63) Drupal\block\BlockRepository->getVisibleBlocksPerRegion() (Line: 138) Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 270) Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() call_user_func() (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 263) Drupal\shield\ShieldMiddleware->bypass() (Line: 219) Drupal\shield\ShieldMiddleware->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)