Fatal error due to using obsolete interface in the actions

Created on 9 October 2023, about 1 year ago
Updated 15 October 2023, about 1 year 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 about 1 year ago
  • Status changed to Needs review about 1 year 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...
    • LOBsTerr committed 6a90ca0b on 2.0.x
      Issue #3392713 by LOBsTerr: Rename variables to group_relationship.
      
  • Status changed to Fixed about 1 year ago
  • Status changed to Needs work about 1 year 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

    • LOBsTerr committed dd578da7 on 2.0.x
      Issue #3392713 by LOBsTerr: Rename back variables to group_content.
      
  • Status changed to Fixed about 1 year ago
  • 🇧🇪Belgium lobsterr

    My fault, I will tag a new version

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

Production build 0.71.5 2024