Fatal error due to using obsolete interface in the actions

Created on 9 October 2023, 9 months ago
Updated 15 October 2023, 8 months ago

Problem/Motivation

The actions ApproveMembershipRequest and RejectMembershipRequest are using GroupContentInterface. This has been changed in group 2 to GroupRelationshipInterface

πŸ› Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium msnassar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @msnassar
  • @msnassar opened merge request.
  • Issue was unassigned.
  • Status changed to Needs work 9 months ago
  • Status changed to Needs review 9 months ago
  • First commit to issue fork.
  • πŸ‡§πŸ‡ͺBelgium LOBsTerr

    Thank you for your contribution

    • LOBsTerr β†’ committed 5d5984fa on 3.0.x
      Issue #3392713 by msnassar, LOBsTerr: Fatal error due to using obsolete...
  • Status changed to Fixed 9 months ago
  • Status changed to Needs work 8 months ago
  • Commit 6a90ca0b broke my install. When I click the "Approve membership" button, it displays the following fatal error:

    The website encountered an unexpected error. Please try again later.
    
    RuntimeException: Controller "Drupal\grequest\Controller\GroupMembershipRequestController::approveMembership()" requires that you provide a value for the "$group_relationship" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one. in Symfony\Component\HttpKernel\Controller\ArgumentResolver->getArguments() (line 80 of /app/vendor/symfony/http-kernel/Controller/ArgumentResolver.php).
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->onController(Object, 'kernel.controller', Object)
    call_user_func(Array, Object, 'kernel.controller', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.controller') (Line: 157)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    ```

    Reverting this commit fixes the problem. I think there may be some other places where the group_content needs to be renamed to group_relationship, such as in the routing parameters for example:
    docroot/modules/contrib/grequest/grequest.routing.yml

  • Status changed to Fixed 8 months ago
  • πŸ‡§πŸ‡ͺBelgium LOBsTerr

    My fault, I will tag a new version

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024