The annotations for "edit-form" and "delete-form" of the "og_membership_type" entity type are not consistent with the actual routes.

Created on 3 February 2023, almost 2 years ago

Problem/Motivation

The annotations for "edit-form" and "delete-form" of the "og_membership_type" entity type are not consistent with the actual routes.
This creates a WSOD when devel is enabled:

Some mandatory parameters are missing ("membership_type") to generate a URL for route "entity.og_membership_type.devel_load".

Proposed resolution

By updating the links annotations in the og/src/Entity/OgMembershipType.php file from:

 *   links = {
 *     "edit-form" = "/admin/structure/membership-types/manage/{membership_type}",
 *     "delete-form" = "/admin/structure/membership-types/manage/{membership_type}/delete",
 *     "collection" = "/admin/structure/membership-types",
 *   }

to:

 *   links = {
 *     "edit-form" = "/admin/structure/membership-types/manage/{og_membership_type}",
 *     "delete-form" = "/admin/structure/membership-types/manage/{og_membership_type}/delete",
 *     "collection" = "/admin/structure/membership-types",
 *   }

It fixes this issue

🐛 Bug report
Status

Active

Component

og.module

Created by

🇭🇰Hong Kong davidpetit

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

Comments & Activities

  • Issue created by @davidpetit
  • 🇭🇰Hong Kong davidpetit

    I just commited the change on this banch https://git.drupalcode.org/issue/og-3338830/-/tree/3338830-annotations-o... on the issue fork.

    Now the links annotation for the og_membership_type entity type are:

     *   links = {
     *     "edit-form" = "/admin/structure/membership-types/manage/{og_membership_type}",
     *     "delete-form" = "/admin/structure/membership-types/manage/{og_membership_type}/delete",
     *     "collection" = "/admin/structure/membership-types",
     *   }
    

    Which are consistent with the routes which use "og_membership_type" (as opposed to "membership_type").

  • @davidpetit opened merge request.
  • Status changed to Needs review almost 2 years ago
  • 🇦🇺Australia digitalcatalyst

    needed this patch to fix error when amending membership types, solved the problem

  • Status changed to RTBC over 1 year ago
  • 🇦🇹Austria agoradesign

    agree, patch is correct

  • 🇦🇹Austria agoradesign

    ok I see that this one is already committed on Github several months ago, but not synced back..... also the last commtis including the alpha10 tag is not on the 8.x-1.x branch, but elsewhere.. please bring back some tidiness in the Drupal repo. This would help anyone getting in touch with OG tremendously, hence raising the chance to welcome more people helping to contribute on this project.

    eg in my case, I'm currently reviewing this module in order to decide, if we can use it in the current project. Of course I'm willing help on reporting/commenting issues and contribute patches, if possible - but having to find my way through
    the Git jungle of this project drastically lowers my motivation regarding this a lot

  • 🇵🇱Poland alorenc Wolsztyn, 🇵🇱

    Thanks! I had exactly the same issue, patch resolved it.

  • 🇧🇷Brazil barone Belo Horizonte

    I completely agree with @agoradesign comment's: Seems that moving the issues to Github kind of split the efforts and contributors, not to mention the sync back problem...

  • Status changed to Closed: duplicate about 2 months ago
  • 🇨🇦Canada joelpittet Vancouver

    This was fixed in c8c303b9ba9ae86e78fba2e7217f6485d5687256, and thanks to @claudiu.cristea we are back in drupal.org git.

Production build 0.71.5 2024