Open rjbain opened 3 years ago
Hey @rjbain It seems that patch is for a pre 1.1 version as those hooks don't exist anymore in 1.1+
So the best path forward is to try and figure out the TypeError issue you are getting. Do you have a PR branch setup with 1.3 installed?
Thanks @labboy0276. I have one set up here: https://pr-551-dgreat.pantheonsite.io/
@labboy0276 I deleted my personal account on that pr-551 branch then logged back in and I was able to view the home page without any error. It did delete all my Top Apps and Fav Links from the dashboard page though. Also, when I initially deleted my account it threw an error, but after logging back in and deleting it again, it didn't throw any error.
This is the error we're getting when deleting some accounts: https://www.drupal.org/project/group/issues/3049434 I'm going to try the patch to see if it fixes that problem.
OK @rjbain I was gonna stare today, but let me know if you need me to look.
@labboy0276 That would be great if you could look at it when you get a chance. If we could get past that TypeError we could upgrade the Group module and not have to worry about someone rebuilding the permissions and breaking the site again.
@labboy0276 Do you think you might have time to stare this week?
Hey @rjbain I was playing around with it the other day. I keep getting sucked into this project that is going live on Weds. I will try and take a look again this week.
Thanks @labboy0276. I really appreciate it.
@labboy0276 Think you might be able to stare this week? Hope your launch went well on Wednesday.
@rjbain I hope so, sorry I haven't won this yet. Been getting pulled in 812 different directions.
I get it @labboy0276. Thanks for keeping it on your radar.
@labboy0276 I hope things are going better for you and the missuz. Just wanted to up this update issue in case you're back to work soon...
I created a new multidev for this issue: https://pr-577-dgreat.pantheonsite.io/
With the Group module updates applied it seems to fix the issue we had with rebuilding permissions breaking the permissions on the site. However, we're getting an error when navigating to the root page when logged in as ourselves:
TypeError: Argument 2 passed to Drupal\group\Entity\Storage\GroupRoleStorage::loadByUserAndGroup() must implement interface Drupal\group\Entity\GroupInterface, null given, called in /code/web/modules/contrib/group/src/GroupMembership.php on line 78 in Drupal\group\Entity\Storage\GroupRoleStorage->loadByUserAndGroup() (line 101 of /code/web/modules/contrib/group/src/Entity/Storage/GroupRoleStorage.php)
So, that's basically the issue we need help with.
Wishing you guys all the best.
Hey @rjbain
Wife is still not 100% but I am working again for the most part. I am just finishing up another project and then can swing back to this one to see whats up. Should be soon.
Thank you @labboy0276. cc @drmyers1
@rjbain I added a patch that stops the error from happening. I am not 100% sure why it is failing. This patch will not add permission for a user if this fails. So I don't believe it will affect anything. The patch is on DO: https://www.drupal.org/project/group/issues/3197610#comment-14112197
Thank you @labboy0276!
I was able to confirm with my account that the page is loading for me. I'm out of the office this week, but will pass on the news to @drmyers1. We'll have to quite a bit of testing on this branch.
@labboy0276 we have ran the test branch through a series of tests and so far we have not found any problems. Is there anything you think we need to be concerned about or need to investigate further with this error? cc @rjbain
@drmyers1 @rjbain I would just double make sure that all the content permission work as expected. Other than that, I can't think of anything else.
@labboy0276 i believe we have tested all the content that has group permissions associated with it. Don't see any issues. cc @rjbain
Hey @labboy0276 I tried upgrading to the dev version of Group and I'm still getting this error when visiting the home/root page:
https://www.drupal.org/project/group/issues/3197610
It doesn't appear when I'm logged in as user 1, but when David and I log in with our own accounts, it throws that error. Also, it goes away if I flush all the caches, but comes back if I log out then back in.
We're currently on Group 1.1, and when we tried rebuilding our permissions, we get this error:
Error: Call to a member function id() on null in gnode_node_access_records() (line 337 of /code/web/modules/contrib/group/modules/gnode/gnode.module) #0 [internal function]: gnode_node_access_records(Object(Drupal\node\Entity\Node)) #1 /code/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('gnode_node_acce...', Array) #2 /code/web/core/modules/node/src/NodeAccessControlHandler.php(149): Drupal\Core\Extension\ModuleHandler->invokeAll('node_access_rec...', Array) #3 /code/web/core/modules/node/node.module(1309): Drupal\node\NodeAccessControlHandler->acquireGrants(Object(Drupal\node\Entity\Node)) #4 /code/web/core/includes/batch.inc(295): _node_access_rebuild_batch_operation(Array) #5 /code/web/core/includes/batch.inc(137): _batch_process() #6 /code/web/core/includes/batch.inc(93): _batch_do() #7 /code/web/core/modules/system/src/Controller/BatchController.php(55): _batch_page(Object(Symfony\Component\HttpFoundation\Request)) #8 [internal function]: Drupal\system\Controller\BatchController->batchPage(Object(Symfony\Component\HttpFoundation\Request)) #9 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #10 /code/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #13 /code/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #14 /code/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #15 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /code/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /code/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main}.
I found a similar error reported here for v1.1 of Group, but the patches didn't apply. I added a comment to the issue: https://www.drupal.org/project/group/issues/3154618#comment-13995269Upgrading from 1.1 prevents this error, but then we run into the error TypeError referred to above. Thanks for any insight you might be able to give!