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, over 1 year ago
Updated 4 November 2023, 8 months 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

RTBC

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 over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia DigitalCatalyst

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

  • Status changed to RTBC 12 months ago
  • πŸ‡°πŸ‡¬Kyrgyzstan elaman
  • πŸ‡¦πŸ‡Ή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...

Production build 0.69.0 2024